How to skip one of multiple optimizers at training_step()?
❓ Questions and Help
What is your question?
I have two models G and D. I want to implement.
I would like to skip updating G after several epochs while keeping updating D.
Code
This is what I want to do
if epoch < 10:
    update G
update D

   
What have you tried?
I guess the frequency of the optimizer for G can be reduced from 1 to 0. But I cannot find how to do it dynamically.
What's your environment?

OS: Ubuntu 16.04
Packaging: Anaconda