eriklindernoren / Keras-GAN

Keras implementations of Generative Adversarial Networks.
MIT License
9.18k stars 3.14k forks source link

Model saving and testing on external data #222

Open hemanthkumar3111 opened 4 years ago

hemanthkumar3111 commented 4 years ago

hi how can I save the model for pix2pix and test the same on my personal data for

hiteshnitetc commented 4 years ago

In def sampleimages: self.discriminator.save("location/dweights%d.hdf5" %epoch) (for discriminator) self.generator.save("location/gweights_%d.hdf5" %epoch) (for generator)

you can also save model in JSON, and use save_weights for saving weights.

KamiKazeFei commented 4 years ago

@hiteshnitetc after I save the weight and model, how to do can use those model and weight to re-train? thx

hiteshnitetc commented 4 years ago

Just use load_model, and then train.

On Sat, Jul 11, 2020 at 8:29 PM KamiKazeFei notifications@github.com wrote:

@hiteshnitetc https://github.com/hiteshnitetc after I save the weight and model, how to do can use those model and weight to re-train? thx

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eriklindernoren/Keras-GAN/issues/222#issuecomment-657076609, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHJSSSUUKFKSFRDWRIB6T53R3B46VANCNFSM4NPCY2UQ .

-- Hitesh Tekchandani PhD Research Scholar NIT Raipur India