DCGAN-tensorflow
DCGAN-tensorflow copied to clipboard
How to save discriminator network?
In the frozen graph, there seems to be only the generator when I print out all the ops. Is there a way to save the discriminator model as well?
Hey, man, have you solved this problem
you can save any model using JSON and save weights here script code to save any model `
from keras.models import model_from_json
model_json = discriminator.to_json()
with open("/PATH/discriminator.json", "w") as json_file:
json_file.write(model_json)
discriminator.save_weights("/PATH/discriminator.h5")
print("Saved model to disk")
`
then you can reuse it after load it
ref. https://machinelearningmastery.com/save-load-keras-deep-learning-models/