Fix bug in tensor attribute setting

Signed-off-by: yuenan.li <yuenan.li@verisilicon.com>
Signed-off-by: Kainan Cha <kainan.cha@verisilicon.com>
This commit is contained in:
yuenan.li 2021-03-16 14:20:18 +08:00 committed by Kainan Cha
parent 8f1c33ea83
commit f79aac314c
1 changed files with 2 additions and 2 deletions

View File

@ -151,8 +151,8 @@ bool TensorImpl::Init() {
memset(&attr, 0x00, sizeof(attr));
attr.dim_num = spec_.shape_.size();
attr.is_const = spec_.attr_ & TensorAttribute::CONSTANT;
attr.vtl = spec_.attr_ & TensorAttribute::TRANSIENT;
attr.is_const = static_cast<bool>(spec_.attr_ & TensorAttribute::CONSTANT);
attr.vtl = static_cast<bool>(spec_.attr_ & TensorAttribute::TRANSIENT);
for (ShapeType::size_type i = 0; i < spec_.shape_.size(); i++) {
attr.size[i] = spec_.shape_[i];