GetTensorShape
Description
Obtains the attribute value of type TensorShape.
Prototype
std::shared_ptr<TensorShape> GetTensorShape() const
Parameters
None
Returns
std::shared_ptr<TensorShape> for the pointer to AttrValue of type TensorShape.
Restrictions
None
Example
This following shows how to obtain operator A's attribute value during operator implementation.
AttrValue *attr = ctx.GetAttr("attr1");
auto shape = attr->GetTensorShape();
Parent topic: Unsupported APIs