title: What is the difference between these two ways of saving keras machine learning model weights?
body: <p>I saw two ways of saving the weights of a keras model.</p>
  
  <p>First way;</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>Second way;</p>
  
  <pre><code>model.save_weights("model_weights.h5")
  </code></pre>
  
  <p>What is the difference between the two ways? Any difference in prediction performance between loading <code>weights.hdf5</code> and <code>model_weights.h5</code>?</p>