Train Discriminator less than Generator #6526
-
I want to train my discriminator ones per 10 iterations but couldn't figure out how to implement it with lightning. Do you have any advice on this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
here is an example: update generator opt every 2 stepsif optimizer_i == 0: update discriminator opt every 4 stepsif optimizer_i == 1: |
Beta Was this translation helpful? Give feedback.
-
Check out the optimization docs. There are a few examples that may help you. https://pytorch-lightning.readthedocs.io/en/latest/common/optimizers.html#step-optimizers-at-arbitrary-intervals |
Beta Was this translation helpful? Give feedback.
Check out the optimization docs. There are a few examples that may help you. https://pytorch-lightning.readthedocs.io/en/latest/common/optimizers.html#step-optimizers-at-arbitrary-intervals