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
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=Truein all Variable definitions in the file:https://github.com/bermanmaxim/LovaszSoftmax/blob/master/pytorch/lovasz_losses.py