-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Description
save_params() and load_params() are used to implement model saving and loading. The model is supposed to be able to continue its training after a saving and loading. However, using save_params() and load_params() cannot satisfy the needs.
The save_params() only save Parameters. But in the Program there are some other critical Variables who are not Parameter, such as optimizers' learning rates and momentums.
The load_params() takes a serialized ProgramDesc protobuf object as its input, and load all Parameters in it. However, there is no such concept of Parameter in the protobuf. All Parameters degrade to normal Variables during flushing into protobuf. Therefore, nothing will be loaded by load_params().
Using save_persistables() and load_persistables_if_exist() seems an avaiable but ungainly substitution.