You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/09/18 03:33:18 UTC

[GitHub] thbupt opened a new issue #12582: In dcgan.py, the parameters of netD are updated as training G?

thbupt opened a new issue #12582: In dcgan.py, the parameters of netD are updated as training G?
URL: https://github.com/apache/incubator-mxnet/issues/12582
 
 
   In dcgan.py, the code for updating G is as followings.
   print(netD(fake))
           with autograd.record():
               output = netD(fake)
               output = output.reshape((-1, 2))
               errG = loss(output, real_label)
               errG.backward()
           trainerG.step(opt.batch_size)
           print(netD(fake))
   I print the output of netD before and after updating G, I found they have different outputs, which means the netD was also updated? In my opinion, only the parameters of G should be updated as excuting trainerG.step(). So what's problem?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services