After building my forward propagation function I try to test it by running this code:
A=BuildModel().cuda()
X=torch.autograd.Variable(torch.randn(1,1,96,96,16))
X.cuda()

B=A(X)

Both in this way and by removing both .cuda(), after a few minutes wait I get a “Kernel died, restarting” error in spyder and a segmentation fault error running it from terminal (in a conda environment). By following these instructions 9 all I could get from the core dumps was:
Cannot access memory at address 0x7f2df11a60b8
Cannot access memory at address 0x7f53fa53d0b8

From GPU and CPU runs. I’m using pytorch-gpu version 0.1.12 in a conda environment, Python 3.6.8,  GeForce GTX 1080