January 2019
Intermediate to advanced
316 pages
8h 16m
English
Saving a model in Keras requires just one line of code. To save the generator models, add the following lines:
# Specify the path for the generator A modelgeneratorAToB.save("directory/for/the/generatorAToB/model.h5") # Specify the path for the generator B modelgeneratorBToA.save("directory/for/the/generatorBToA/model.h5")
Similarly, save the discriminator models by adding the following lines:
# Specify the path for the discriminator A modeldiscriminatorA.save("directory/for/the/discriminatorA/model.h5") # Specify the path for the discriminator B modeldiscriminatorB.save("directory/for/the/discriminatorB/model.h5")
Read now
Unlock full access