mirror of https://github.com/alibaba/MNN.git
Fix zero shape bug for TensorArray
This commit is contained in:
parent
a469efe8ad
commit
7f50ae689d
|
|
@ -59,6 +59,9 @@ class TensorArrayComputer : public SizeComputer {
|
|||
std::vector<int> elemShape(param->element_shape()->size());
|
||||
for (int i = 0; i < param->element_shape()->size(); i++) {
|
||||
elemShape[i] = param->element_shape()->Get(i);
|
||||
if (elemShape[i] < 0) {
|
||||
elemShape[i] = 0;
|
||||
}
|
||||
}
|
||||
des->tensorArrayAttr->elemShape.emplace_back(std::move(elemShape));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue