Open dsshim0125 opened 2 years ago
I encountered the same issue when I use a newer version of pytorch.
Swap the order of Train G and Train D may help. In main.py:
def train(...):
...
# Train G
optimizer_netG.zero_grad()
loss_netG.backward()
optimizer_netG.step()
# Train D
optimizer_netD.zero_grad()
loss_netD.backward()
optimizer_netD.step()
...
Train G first, then train D.
@Ice9Coffee: Thanks, I had the same problem like @dsshim0125 and swaping the order resolved the issue for me.
Hi,
thank you for your excellent work.
I have run the train code, but I encountered inplace operation error in an adversarial loss.
How can I solve it?
Thank you!
GAN의 adversarial loss부분에서 inpalce operation 에러가 발생하는데 어느 부분을 수정해야할까요?
감사합니다!