Nice work you did. When I read the code carefully, I found the code in coach.py in line 402
"
self.discriminator.zero_grad()
r1_final_loss = self.opts.r1 / 2 r1_loss self.opts.d_reg_every + 0 * real_pred[0]
r1_final_loss.backward()
self.discriminator_optimizer.step()
"
self.discriminator.zero_grad() should be modified to self.discriminator_optimizer.zero_grad()
Nice work you did. When I read the code carefully, I found the code in coach.py in line 402 " self.discriminator.zero_grad() r1_final_loss = self.opts.r1 / 2 r1_loss self.opts.d_reg_every + 0 * real_pred[0] r1_final_loss.backward() self.discriminator_optimizer.step() " self.discriminator.zero_grad() should be modified to self.discriminator_optimizer.zero_grad()