File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -43,11 +43,6 @@ void NewRemoteParameterUpdater::init(
43
43
const std::vector<ParameterPtr> ¶meters) {
44
44
ParameterUpdater::init (parameters);
45
45
46
- for (auto ¶ : parameters_) {
47
- para->getBuf (PARAMETER_VALUE)->zeroMem ();
48
- para->getBuf (PARAMETER_GRADIENT)->zeroMem ();
49
- }
50
-
51
46
// create parameter server client.
52
47
if (useEtcd_) {
53
48
parameterClient_ =
@@ -109,6 +104,8 @@ void NewRemoteParameterUpdater::init(
109
104
LOG (ERROR) << " got unsupported v1 learning_rate_schedule config: "
110
105
<< trainerConfig_.learning_rate_schedule () << " , set to const" ;
111
106
optimizerConfigV2.set_lr_policy (paddle::OptimizerConfig::Const);
107
+ optimizerConfigV2.mutable_const_lr ()->set_learning_rate (
108
+ trainerConfig_.learning_rate ());
112
109
}
113
110
114
111
// overwrite optimizerConfigV2 for per-parameter(layer) configs
You can’t perform that action at this time.
0 commit comments