设置AttrValue的list TensorShape类型的属性值。
uint32_t SetListTensorShape(const std::vector<TensorShape *> &shape)
参数 |
输入/输出 |
说明 |
---|---|---|
shape |
输入 |
需要设置AttrValue的list TensorShape的属性值。 |
uint32_t,设置成功的个数。
无。
算子实现时可使用如下接口设置算子A的属性值。
AttrValue *attr = ctx.GetAttr("attr1"); std::vector<TensorShape *> vals; vals.push_back(shape); uint32_t successNum = attr->SetListTensorShape(vals);