@tom  Sorry, it’s a typo, I have corrected it. It should be
torch.save(G.module.state_dict(), os.path.join(ckpt_dir, 'netG_{}.pth'.format(ep)))
torch.save(D.module.state_dict(), os.path.join(ckpt_dir, 'netD_{}.pth'.format(ep)))

I was just modifying the code when copying it, and forgot to change it back , my fault, the error has nothing to do with the typo.