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

test=develop
dependabot/pip/python/requests-2.20.0
Zhaolong Xing 6 years ago committed by GitHub
parent 3bfb92c32b
commit 5efe8c7287
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -131,9 +131,7 @@ class LoDTensorToArrayOp : public framework::OperatorBase {
} }
} }
auto &outputs = *const_cast<framework::Scope &>(scope) std::map<size_t, framework::Tensor> outputs;
.Var()
->GetMutable<std::map<size_t, framework::Tensor>>();
for (size_t i = 0; i < max_seq_len; ++i) { for (size_t i = 0; i < max_seq_len; ++i) {
auto &ranges = copy_ranges[i]; auto &ranges = copy_ranges[i];

Loading…
Cancel
Save