Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Gradients problem #28

Open
amlarraz opened this issue Apr 24, 2020 · 3 comments
Open

Gradients problem #28

amlarraz opened this issue Apr 24, 2020 · 3 comments

Comments

@amlarraz
Copy link

Hi, I've tried to use your loss implementation using pytorch 1.4 and the network do not learn anything. This is because you've used Variable to define some tensors in the loss and in this Pytorch version the Variable has been deprecated as you can see in:
https://pytorch.org/docs/stable/autograd.html#variable-deprecated.

I've fixed this problem by adding requires_grad=True in all Variable definitions in the file:
https://github.com/bermanmaxim/LovaszSoftmax/blob/master/pytorch/lovasz_losses.py

@brooklyn1900
Copy link

Hi, my lovaszsoftmax loss is around 0.35 and never get lower for training and validation, and the test iou is low. Do you know why? thanks

@amlarraz
Copy link
Author

But it got stuck at this value or it never decreases?

@mrluin
Copy link

mrluin commented Dec 27, 2020

Hello @brooklyn1900
I have tried LovaszSoftmaxLoss on different datasets. In one of them, I have the same problem with you, loss was always swing around at 0.30 and got nan value later. But on the other dataset, everything was normal.

Did you solve your problem?

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

No branches or pull requests

3 participants