I want to show generated images but I think there is some problem with generatorModel update so images are not generating well. I am trying to fix it. I am really sorry for this [some unknown] problem in my code.
I would definitely love to contribute to Swift model garden. But there is some problem in training of generatorModel I think & images aren’t generating good after some steps.
The problem is I can’t shut down gradient computation in criticModel during generatorModel train step as output of generatorModel goes into criticModel. In case of criticModel training step I could shut down grad computation in generatorModel by simply calling .withoutDerivative() but there must be some way to stop grad computation of specific model itself so that I can restrict criticModel from computing gradients.
Possible solution: To run forward pass of criticModel, after generatorModel forward pass, in some Context.trainingPhase = .inference to stop grad computes. Will this work to shut down gradient updates of criticModel letting grad computes only for generatorModel?
@rxwei I’d like to have some help if you are free to make WGAN train nicely so that I can contribute to Swift model garden.