SetListTensorShape
Description
Sets AttrValue in the form of a TensorShape list.
Prototype
uint32_t SetListTensorShape(const std::vector<TensorShape *> &shape)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
shape |
Input |
Value of the AttrValue attribute, TensorShape list. |
Returns
uint32_t for the number of successfully set elements.
Restrictions
None
Example
This following shows how to set operator A's attribute value during operator implementation.
AttrValue *attr = ctx.GetAttr("attr1");
std::vector<TensorShape *> vals;
vals.push_back(shape);
uint32_t successNum = attr->SetListTensorShape(vals);
Parent topic: Unsupported APIs