nn.ConvTranspose2d returning an array with all the elements set to nan

I’m working on a pytorch implementation of U-net (https://lmb.informatik.uni-freiburg.de/people/ronneber/u-net/).
For up-convolution I’m using nn.ConvTranspose2d. During the training procedure, after some iterations, ConvTranspose2d is returning arrays with all the elements set to ‘nan’. Why is that happening?

Configurations of the up-conv layer: ConvTranspose2d(1024, 512, kernel_size=(2, 2), stride=(2, 2))

The reason is that the kernel consist of nan elements. That means, it’s an issue with the last weight update.

1 Like