Edit model after loading it woth only the .h5 file

Question:

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

Asked By: Kome Gognome

||

Answers:

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.

Answered By: Gameplay
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.