简体   繁体   中英

How to save momentum during training in Keras?

I want to be able to save the state of training my neural net using SGD. I know I can save the weights using the save_weights function. What I don't know is how to save the momentum of the gradient decent. Does anyone know how to do this?

使用model.optimizer.get_state()model.optimizer.set_state() - 请参阅https://github.com/fchollet/keras/issues/454

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM