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 f192e56 commit 49f9e3fCopy full SHA for 49f9e3f
lite/api/light_api.cc
@@ -401,8 +401,9 @@ void LightPredictor::ClearTensorArray(
401
const cpp::VarDesc* var = block->GetVar<cpp::VarDesc>(var_idx);
402
CHECK(var);
403
404
- auto tmp = program_->exec_scope()->FindVar(var->Name());
405
- if (tmp->IsType<std::vector<Tensor>>()) {
+ auto* var_ptr = program_->exec_scope()->FindVar(var->Name());
+ if (var_ptr->IsType<std::vector<Tensor>>() &&
406
+ (var->Name() != "feed" && var->Name() != "fetch")) {
407
std::vector<Tensor>* tensor_array_var =
408
program_->exec_scope()->FindMutableTensorList(var->Name());
409
CHECK(tensor_array_var);
0 commit comments