fix the bug that input tensor data with old size dosen't free

This commit is contained in:
zengxianglong 2022-02-10 19:49:56 +08:00
parent 9daf5933e1
commit ea6368c98c
1 changed files with 1 additions and 0 deletions

View File

@ -158,6 +158,7 @@ int LiteOpActor::ResizeGraphInput(const std::vector<mindspore::tensor::MSTensor
auto src_tensor = map.second;
for (size_t i = 0; i < inputs.size(); i++) {
if (src_tensor == inputs[i]) {
isolate_tensor->FreeData();
isolate_tensor->set_shape(dims[i]);
}
}