Skip to content

Commit 6ebfc72

Browse files
authored
Merge pull request #5104 from helinwang/momentum
Fix pserver SGD with momemtum checkpoint recover.
2 parents a384249 + 01df52a commit 6ebfc72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddle/optimizer/sgd_optimizer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void SGDOptimizer::DeserializeState(const std::string &str) {
4444
this->lr_policy_->DeserializeState(lr_state.SerializeAsString());
4545
num_sample_passed_ = state.num_sample_passed();
4646
ProtoToTensor(state.parameter(), parameter_);
47-
if (momentum_ != 0.0) ProtoToTensor(state.parameter(), momentums_);
47+
if (momentum_ != 0.0) ProtoToTensor(state.momentums(), momentums_);
4848
}
4949

5050
} // namespace optimizer

0 commit comments

Comments
 (0)