Home > OS >  Edit model after loading it woth only the .h5 file
Edit model after loading it woth only the .h5 file

Time:12-11

It's the first time I'm loading a model when the .h5 file is all I have. This is what I've done right now:

import tensorflow as tf 
from tensorflow.keras.models import load_model
from keras.layers import Activation, Dense

new_model = load_model(filepath)

new_model.optimizer

new_model.get_weights()

I was wondering is there a way to recreate the train and test data? Are they important to retrive to start edit the saved model or is there another way? Thanks for the help

CodePudding user response:

When you have a trained model (no matter the format actually) it's the architecture and weights, the train and test data are not "melted" into the model anyhow and you cannot retrieve it from it.

  • Related