I have saved models for a large number of autoencoders that I am using for my project. They were saved using the autoencoder.save(outdir + "autoencoder_"+params)
function.
Is there any way for me to extract the encoder and decoder components of each of these saved models, or would I need to rerun the script and add in the encoder = Model(input, bottleneck)
and decoder = Model(bottleneck, output)
lines and save those models?
Here is the autoencoder structure I am attempting to retrieve:
autoencoder.summary()
Model: "model_3"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
input_1 (InputLayer) [(None, 3593, 4)] 0
_________________________________________________________________
flatten (Flatten) (None, 14372) 0
_________________________________________________________________
dense (Dense) (None, 1797) 25828281
_________________________________________________________________
dense_1 (Dense) (None, 719) 1292762
_________________________________________________________________
dense_2 (Dense) (None, 180) 129600
_________________________________________________________________
dense_3 (Dense) (None, 719) 130139
_________________________________________________________________
dense_4 (Dense) (None, 1797) 1293840
_________________________________________________________________
dense_5 (Dense) (None, 14372) 25840856
_________________________________________________________________
reshape (Reshape) multiple 0
=================================================================
Total params: 54,515,478
Trainable params: 54,515,478
Non-trainable params: 0
_________________________________________________________________