Discriminator is unable to adapt to high loss. #2921
-
I'm currently trying to implement a pix2pix cgan to translate images into sketches (repository). My issue seems to be that the discriminator is not able to adjust when i punish it with the success of the generator. The loss just keeps ramping up until the discriminator classifies everything as valid picture. Is there a way to retrieve tensors from gradients? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Sorry for the delayed response!
With the |
Beta Was this translation helpful? Give feedback.
-
I think i might have resolved at least parts of my issue: In my naive approach i detached the tensor while calculating the loss. If I understand it correctly this cause the tensor to be disconnected from the operations before and therefore the optimizer is not able to "reach" this operations in the next optimization step to change the corresponding weights. |
Beta Was this translation helpful? Give feedback.
I think i might have resolved at least parts of my issue:
When training two model graphs in parallel one has to be quite particular when to detach a tensor from the model graph.
In my naive approach i detached the tensor while calculating the loss. If I understand it correctly this cause the tensor to be disconnected from the operations before and therefore the optimizer is not able to "reach" this operations in the next optimization step to change the corresponding weights.
Here is what i did it to fix the issue.