Created by: chenwhql
PR types
Function optimization
PR changes
APIs
Describe
【兼容升级】Refine set_dict
related APIs:
- Change
set_dict
method name toset_state_dict
, add alias for compatibility
-
Layer.set_dict
->Layer.set_state_dict
-
DataParallel.set_dict
->DataParallel.set_state_dict
-
Optimizer.set_dict
->Optimizer.set_state_dict
-
LearningRateDecay.set_dict
->LearningRateDecay.set_state_dict
-
_LRScheduler.set_dict
->_LRScheduler.set_state_dict
- change
stat_dict
argument tostate_dict
, which is typo in old implementations, add decoratordeprecate_stat_dict
for compatibility
-
Layer.set_dict(stat_dict)
->Layer.set_dict(state_dict)
-
DataParallel.set_dict(stat_dict)
->DataParallel.set_dict(state_dict)
-
Optimzier.load(stat_dict)
->Optimzier.load(state_dict)
- remove Layer's
load_dict
, which is a deprecated API, add alias for compatibility
related cn doc PR: https://github.com/PaddlePaddle/FluidDoc/pull/2535