nan training loss #4243
-
Hi , Thanks In Advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
The code is too long for us to reasonably debug a PDF file. Try to make a minimum working example based off our tutorials, and then increase the complexity until you end up solving the research question that you are currently interested in. One bug I noticed -- your loss function uses |
Beta Was this translation helpful? Give feedback.
-
@nourmagde00 it is a known issue that AMP does not support very well with 3D operations. Sometimes turning on AMP would return NaN loss values, especially for SegResNet. You can either turn off AMP, or switch to a different segmentation network. |
Beta Was this translation helpful? Give feedback.
The code is too long for us to reasonably debug a PDF file. Try to make a minimum working example based off our tutorials, and then increase the complexity until you end up solving the research question that you are currently interested in.
One bug I noticed -- your loss function uses
sigmoid=True
, but I think this should besoftmax=True
since you have multi-channel output.