We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c98e21 commit c671c00Copy full SHA for c671c00
kerasTUT/10-save.py
@@ -30,12 +30,13 @@
30
cost = model.train_on_batch(X_train, Y_train)
31
32
# save
33
-model.save('my_model.h5') # HDF5 file
+print('test before save: ', model.predict(X_test[0:2]))
34
+model.save('my_model.h5') # HDF5 file, you have to pip3 install h5py if don't have it
35
del model # deletes the existing model
36
37
# load
38
model = load_model('my_model.h5')
-
39
+print('test after load: ', model.predict(X_test[0:2]))
40
"""
41
# save and load weights
42
model.save_weights('my_model_weights.h5')
0 commit comments