I tried learner.save() which did not seem to recover the model on learner.load() for the GAN model. I’m not loading for inference, I’m loading to continue training and it did not restore to the point in training it had got to previously - just a mess!
My question to you was did you have any code examples of how you saved and restored a GAN learner for further training? Or do you not know how to do this?
The learn object here which the training happens on is thus the critic & generator i.e.
As you will see from the notebook, each epoch of this learner (critic & gan) shows a generated image, which tells you how well it is doing. By the last epoch you can see where it has got to.
This is the learner I am trying to save with:
Which when restored with:
Does not seem to recover i.e. when you continue training, you can see from the generated images at each epoch that it has lost the progress gained from earlier training (its all just pixelated mess).
So seems like I may be using a different approach to creating my wgan? but the one shown in the notebooks - and this wgan object does not seem to save state well to continue training - have you used wgan and saved state for further training to continue?
I haven’t used wgan with saving/loading models, but again, what command are you using to save/load in your models? Remember that those generated images are created from the generator model, so when you load in whatever saved model files you have, check if the weights of the last layers are being updated or not in the generator model. If the latter, then that’s your problem right there.
Currently I have to save the gen learner, the critic learner, and the gan learner if I want to be able to use a GAN for inference later. Has anyone figured out a way to actually export() a gan learner for easy inference? Now I have to run quite a lot of code setting everything back up again so I can load all three models and it is not very production ready.