pytorch-goodies icon indicating copy to clipboard operation
pytorch-goodies copied to clipboard

error with dice loss

Open gcucurull opened this issue 5 years ago • 1 comments

When I use dice loss for Pytorch 1.3 I get the following error when I try to call loss.backward().

RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn

Any idea why?

gcucurull avatar Mar 23 '20 17:03 gcucurull

Hey @gcucurull, could you post a minimal working example?

kevinzakka avatar Mar 25 '20 15:03 kevinzakka