Skip to content
Advertisement

How to save Keras encoder and decoder separately?

I have created an autoencoder using a separate encoder and decoder as described in this link.

Split autoencoder on encoder and decoder keras

I am checkpointing my autoencoder as followed. How do I save the encoder and decoder separately corresponding to the autoencoder? Alternatively, can I extract deep encoder and decoder from my save autoencoder?

JavaScript

Advertisement

Answer

You could try to overwrite the autoencoder’s save function, which the ModelCheckpoint uses, to have it save the encoder and decoder Models separately instead.

JavaScript

Make sure to set the save function BEFORE fit.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement