from tensorflow import keras
model = keras.models.load_model('path/to/location')
1
0
serializza il modello keras
# Save the modelmodel.save('path_to_my_model.h5')# Recreate the exact same model purely from the filenew_model = keras.models.load_model('path_to_my_model.h5')
0
0
keras carica il modello con oggetti personalizzati
model = load_model(path,custom_objects={"weighted_loss":weighted_loss})