kfzyqin / Implementation-MolGAN-PyTorch

PyTorch implementation of MolGAN: MolGAN: An implicit generative model for small molecular graphs.
50 stars 8 forks source link

RuntimeError:RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation #8

Closed peggy-minyao closed 2 years ago

peggy-minyao commented 2 years ago

when i run : python main_gan.py it return: RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [512, 45]], which is output 0 of TBackward, is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True). i have searched this error in google, but i don't konw how to debug it. Can you help me?

peggy-minyao commented 2 years ago

the close issues have the answers.