Even I don’t know. When I was trying, I was getting Nan. But then, I broke it down. I checked if just the pretrained model was giving nan. Sometimes it did and sometimes it didn’t. Mostly it didn’t.
Then after adding each fc layer I checked the output and again the same. Sometimes it would give nan but mostly, it would give some result.
I don’t know if there’s some dedicated debugging for this. What do you suggest? Maybe pytorch needs a nan detector.