SetTensorShape
函数功能
设置TensorShape类型的属性值。
函数原型
bool SetTensorShape(const TensorShape *shape)
参数说明
| 参数 | 输入/输出 | 说明 | 
|---|---|---|
| shape | 输入 | 需要设置的TensorShape类型的属性值。 | 
返回值说明
bool类型。
- true:表示设置成功。
- false:表示设置失败。
约束说明
无。
调用示例
算子实现时可使用如下接口设置算子A的属性值。
AttrValue *attr = ctx.GetAttr("attr1");
bool ret = attr->SetTensorShape(shape);
父主题: 暂不支持使用接口