This is the error message I got, though I know the root cause may be those ‘nan’ values…
Traceback (most recent call last):
File “/Users/xxx/Desktop/YL-Net/train.py”, line 85, in 
output = net(imgdata)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/torch/nn/modules/module.py”, line 224, in call
result = self.forward(*input, **kwargs)
File “/Users/xxx/Desktop/YL-Net/YLNet3D.py”, line 100, in forward
de1_unpool = self.unpool_1(de_1, indices_3, output_size=size_3) #transfer of indices
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/torch/nn/modules/module.py”, line 224, in call
result = self.forward(*input, **kwargs)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/torch/nn/modules/pooling.py”, line 371, in forward
self.padding, output_size)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/torch/nn/functional.py”, line 352, in max_unpool3d
return _functions.thnn.MaxUnpool3d.apply(input, indices, output_size, stride, padding)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/torch/nn/_functions/thnn/pooling.py”, line 241, in forward
ctx.padding[0], ctx.padding[2], ctx.padding[1])
RuntimeError: found an invalid max index 16321 (output volumes are of size 6x6x6) at /Users/soumith/code/builder/wheel/pytorch-src/torch/lib/THNN/generic/VolumetricMaxUnpooling.c:118