Hi,
MMBackward’s input 0 being nan most likely means that your weights contain nan values?
So maybe your optimizer step that makes weights become nan?
What is the loss value before you encounter the issue? Also do you use any function that might lead to nan for special inputs (sqrt at 0 or log at <= 0 etc)?