Thanks for your code! I have been successful in running 'train.py'. But when running the 'train_semi_supervised.py' ,I got some trouble.
when I running Function 'backward_D', I can not get the value 'self.real_z_mean'. Then I change the code as following:
if self.real_z_mean is None:
pred_real = self.netD(self.real.detach())
else:
pred_real = self.netD(**{'x': self.real.detach(), 'z': self.real_z_mean.detach()})
Then, I got another trouble.
in line 332: AttributeError: 'Discriminator' object has no attribute 'infer_img'. Then I change the code as following:
self.netD.infer_img.blocks[0][0].conv1.bias.grad==0
but the gradients of D are nan
finally, I change the 'Discriminator' to 'BiDiscriminator', Because 'BiDiscriminator' has attribute 'infer_img'. But It dose not work.
what should I do?
Thank you!
Thanks for your code! I have been successful in running 'train.py'. But when running the 'train_semi_supervised.py' ,I got some trouble.