GetInputShape
Function
Obtains the actual storage shape of an operator's input tensor.
Function Prototype
const gert::StorageShape* GetInputShape(int64_t index) constParameters
| Parameter | Input/Output | Description |
|---|---|---|
| index | Input | Input index of the operator. This input index refers to the actual index after the operator is instantiated, not the index in the prototype definition. |
Return Value
Returns a StorageShape structure, which represents the storage shape of the input tensor.
Constraints
When using it, ensure that you do not modify the returned StorageShape and do not attempt to release it.
Example
gert::StorageShape* GetInputShape(OpCheckContext* context) {
int64_t index = 9;
gert::StorageShape* shape = context->GetInputShape(index);
...
}