cyclomon / 3dbraingen

Official Pytorch Implementation of "Generation of 3D Brain MRI Using Auto-Encoding Generative Adversarial Network" (accepted by MICCAI 2019)
MIT License
126 stars 38 forks source link

In alpha wgan loss3.backward(retain_graph=True) #16

Open shiblyg opened 1 year ago

shiblyg commented 1 year ago

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [1, 64, 3, 3, 3]] is at version 293; expected version 292 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True). When I comment this it runs but I am guessing for the code_discriminator it should issue as the loss is not backword the weight will not update?

cyclomon commented 1 year ago

Hi, sorry for the inconvenience since the our repository is trained with pytorch 0.4, it will make error when trained with higher version of pytorch.

Now I am planning to update the code for higher version of Pytorch.