Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

After several rounds, the loss function will become nan. #10

Open
zhrli opened this issue Aug 11, 2021 · 1 comment
Open

After several rounds, the loss function will become nan. #10

zhrli opened this issue Aug 11, 2021 · 1 comment

Comments

@zhrli
Copy link

zhrli commented Aug 11, 2021

logdet value becomes nan, when I used the UCR dataset named FaceDetecion.
I chosed the BERT model to deal with the multiple timeseries data.
I wonder why this happened?

@waterdisappear
Copy link

waterdisappear commented Nov 6, 2024

I think normalize is helpful.

    def forward(self, X, Y, num_classes=None):
        if num_classes is None:
            num_classes = Y.max() + 1
        X = F.normalize(X, dim=-1)
        W = X.T
        Pi = tf.label_to_membership(Y.numpy(), num_classes)
        Pi = torch.tensor(Pi, dtype=torch.float32).cuda()

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants