未验证 提交 5efe8c72 编写于 作者: Z Zhaolong Xing 提交者: GitHub

fix bug: the lod_tensor_to_array op will aplly a new var but not release when...

fix bug: the lod_tensor_to_array op will aplly a new var but not release when dong inference (#17856)

test=develop
上级 3bfb92c3
......@@ -131,9 +131,7 @@ class LoDTensorToArrayOp : public framework::OperatorBase {
}
}
auto &outputs = *const_cast<framework::Scope &>(scope)
.Var()
->GetMutable<std::map<size_t, framework::Tensor>>();
std::map<size_t, framework::Tensor> outputs;
for (size_t i = 0; i < max_seq_len; ++i) {
auto &ranges = copy_ranges[i];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册