one of the variables needed for gradient computation has been modified by an inplace operation [torch.cuda.FloatTensor [1, 64, 3, 3, 3]]
Asked Answered
M

0

1

Im currently working on 3D-GAN with FMRI Datasets.I referred the codes from github , https://github.com/cyclomon/3dbraingen/blob/master/VAEGAN_ADNI_train.ipynb

And the error that I have never seen before keeps occur..

Can anyone help me solve this problem?

The error is like : RunTimeError

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 2; expected version 1 instead.

And the training GAN code looks like:

Code1 Code2

Measles answered 22/2, 2021 at 6:56 Comment(1)
It is important that you paste the code in code blocks as text, and not screenshot the code. Screenshotted code cannot be copied and referenced in answers.Aureole

© 2022 - 2024 — McMap. All rights reserved.