We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89728f8 commit d752768Copy full SHA for d752768
paddle/fluid/framework/details/scale_loss_grad_op_handle.cc
@@ -30,10 +30,11 @@ ScaleLossGradOpHandle::~ScaleLossGradOpHandle() {}
30
31
void ScaleLossGradOpHandle::RunImpl() {
32
std::string var_name = static_cast<VarHandle *>(this->outputs_[0])->name_;
33
+ auto &local_scope = *scope_->FindVar(kLocalExecScopeName)->Get<Scope *>();
34
- float *tmp =
35
- scope_->FindVar(var_name)->GetMutable<LoDTensor>()->mutable_data<float>(
36
- make_ddim({1}), place_);
+ float *tmp = local_scope.FindVar(var_name)
+ ->GetMutable<LoDTensor>()
37
+ ->mutable_data<float>(make_ddim({1}), place_);
38
39
if (platform::is_cpu_place(place_)) {
40
*tmp = coeff_;
0 commit comments