I saw two ways of saving the weights of a keras model.
First way;
checkpointer = ModelCheckpoint(filepath="weights.hdf5", verbose=1, save_best_only=True)
model.fit(x_train, y_train,
nb_epoch=number_of_epoch,
batch_size=128,
verbose=1,
validation_data=(x_test, y_test),
callbacks=[reduce_lr, checkpointer],
shuffle=True)
Second way;
model.save_weights("model_weights.h5")
What is the difference between the two ways? Any difference in prediction performance between loading weights.hdf5
and model_weights.h5
?