设置TensorShape类型的属性值。
bool SetTensorShape(const TensorShape *shape)
参数
输入/输出
说明
shape
输入
需要设置的TensorShape类型的属性值。
bool类型。
无。
算子实现时可使用如下接口设置算子A的属性值。
AttrValue *attr = ctx.GetAttr("attr1"); bool ret = attr->SetTensorShape(shape);