Pedestrian-Synthesis-GAN
Pedestrian-Synthesis-GAN copied to clipboard
Should person discriminator's loss be back-propagated to generator?
I think discriminator's loss should't be back-propagated to generator.
But in the source code, when calculating cropped pedestrian discriminator's loss, the tensor self.person_crop_fake
isn't detached. I think it should be detached. Is this a bug?
https://github.com/yueruchen/Pedestrian-Synthesis-GAN/blob/master/models/pix2pix_model.py#L131
The generator optimizer is applied with zero_grad() before forwarding fake examples. So you dont need to detach here
I see. Although it don't affect the training result, I still think doing detach here is a bit better for computation efficiency, right?
I see. Although it don't affect the training result, I still think doing detach here is a bit better for computation efficiency, right?
Hi. Just wondering if you did ever get this to work ? I mean in Testing mode , generating images?I can train the model, it looks fantastic all is good but when running the test script the images generated are really, really bad. I checked everythng I could in terms of making sure the input tensors look okay when they are passed to the generator, the model is in evaluation mode, etc all looks good with horrible results. It seems such a nice idea but I simply don't see how the author made this work using the code from git.