March 2018
Intermediate to advanced
320 pages
7h 53m
English
After training a CGAN, you may find useful to use the produced images in other applications. The method generate_new can be used to extract single images as well as a set of images (in order to check the quality of results for a specific image class). It operates on a previously trained CGan class, so all you have to do is just to pickle it in order first to save it, then to restore it again when needed.
When the training is complete, you can save your CGan class using pickle, as shown by these commands:
import picklepickle.dump(gan, open('mnist.pkl', 'wb'))
In this case, we have saved the CGAN trained on the MNIST dataset.
After you have restarted the Python session and memory is clean of any variable, you can just ...
Read now
Unlock full access