Loading model but restarting learning rate?

25 views
Skip to first unread message

Piotr Chudzik

unread,
Mar 17, 2017, 1:23:29 PM3/17/17
to Keras-users
Hi,

   I save a model with ModelCheckpoint that saves everything (config,weights, etc.) into a single file using method model.save_weights(filepath).

   Then I load the model and all parameters are loaded also but since I am trying to fine tune the network with new data (not continue the training with old data) I would like to restart the learning rate and optimizer because my saved model was halving the learning rate which is quite small now and learning doesn't go far.

  So after I call  model.load_model which compiles the model inside with saved settings, I call model.compile again with new optimizer, loss and learning rate.

  Does compiling the same model the second time is correct here? I see that learning rate restarted but I am afraid that I might have restarted/removed something else, e.g. weights? 

   Is compiling the model again with fresh optimizer,loass and metrics safe?

Many Thanks,
P
Reply all
Reply to author
Forward
Message has been deleted
0 new messages