sandeep-krishnamurthy commented on issue #12582: In dcgan.py, the parameters of 
netD are updated as training G?
URL: 
https://github.com/apache/incubator-mxnet/issues/12582#issuecomment-436434362
 
 
   Hello @thbupt 
   
   I verified that as expected, with trainerG.step(), the Discriminator network 
(netD) is not updated. Below is the code snippet I used in the training loop 
under update G network.
   
   ```python
           with autograd.record():
               fake = netG(latent_z)
               output = netD(fake).reshape((-1, 1))
               errG = loss(output, real_label)
               errG.backward()
           
           print("Before ")
           print(netD(fake))
           trainerG.step(batch.data[0].shape[0])
           print("After ")
           print(netD(fake))
   ```
   
   However, please note that you are generating a new fake images here. You are 
not using fake images generated in Update D network section. So, if you verify 
netD(fake) before this block, you are actually using different input fake 
images so the output is different.
   
   Resolving for now. Please reopen if issue still persists or you have any 
further queries.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to