amzn / convolutional-handwriting-gan

ScrabbleGAN: Semi-Supervised Varying Length Handwritten Text Generation (CVPR20)
https://www.amazon.science/publications/scrabblegan-semi-supervised-varying-length-handwritten-text-generation
MIT License
264 stars 55 forks source link

About training simi-supervised model #4

Closed jqq1226 closed 4 years ago

jqq1226 commented 4 years ago

Thanks for your code! I have been successful in running 'train.py'. But when running the 'train_semi_supervised.py' ,I got some trouble.

  1. 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.
  2. 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
  3. finally, I change the 'Discriminator' to 'BiDiscriminator', Because 'BiDiscriminator' has attribute 'infer_img'. But It dose not work. what should I do? Thank you!
rlit commented 4 years ago

Hi, thanks for you interest!

We will look into this, we have a fix coming soon anyway.

rlit commented 4 years ago

I hope this commit helps, please re-open of not