kevinzakka / pytorch-goodies

PyTorch Boilerplate For Research
603 stars 71 forks source link

error with dice loss #11

Open gcucurull opened 4 years ago

gcucurull commented 4 years ago

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?

kevinzakka commented 4 years ago

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