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:
parent
8f1c33ea83
commit
f79aac314c
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Reference in New Issue