nan train_loss during training process #976
-
Hi there I am using a combination of MONAILabel and 3D Slicer to segment breasts from MRI images. To do that, I tried to use the segmentation.py file in the radiology app. I only edited the labels in this file and set use_pretrained_model to false. I am using CUDA on Linux. I saw another discussion that suggested I turn off AMP. But I don't know how to do that. Does anyone have any ideas? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @jos-stevens, Thanks for opening this discussion. This can happen when the intensity normalization isn't properly done before training. If you know the intensity range of the organ/tissue of interest, you could update the arguments in this transform: https://github.com/Project-MONAI/MONAILabel/blob/main/sample-apps/radiology/lib/trainers/segmentation.py#L82 If not, I'd suggest you update the optimizer here: https://github.com/Project-MONAI/MONAILabel/blob/main/sample-apps/radiology/lib/trainers/segmentation.py#L63 and give it a try. You could use any of these two optimizers: https://github.com/Project-MONAI/MONAILabel/blob/main/sample-apps/radiology/lib/trainers/localization_spine.py#L60-L61 If using Novograd remember to import it first - like this: Hope this helps, |
Beta Was this translation helpful? Give feedback.
Hi @jos-stevens,
Thanks for opening this discussion.
This can happen when the intensity normalization isn't properly done before training. If you know the intensity range of the organ/tissue of interest, you could update the arguments in this transform: https://github.com/Project-MONAI/MONAILabel/blob/main/sample-apps/radiology/lib/trainers/segmentation.py#L82
If not, I'd suggest you update the optimizer here: https://github.com/Project-MONAI/MONAILabel/blob/main/sample-apps/radiology/lib/trainers/segmentation.py#L63 and give it a try.
You could use any of these two optimizers: https://github.com/Project-MONAI/MONAILabel/blob/main/sample-apps/radiology/lib/trainers/localization_spine.py#L…