How can I use a weight matrix created by a trained neural network to make predictions in another file?

Save your model or the weights of your model:, model.get_weights())

For loading, in the first case:

from keras.models import load_model
model = load_model(filename)

In the second case:

#recreate the model then:


results = model.predict(batch_of_data)

Browse More Popular Posts

Leave a Comment