GetOutputShape
Function Usage
Obtains the actual storage shape of the operator output tensor.
Prototype
1 | const gert::StorageShape* GetOutputShape(int64_t index) const |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
index |
Input |
Index of the operator output. The output index refers to the actual index after operator instantiation, not the index in the prototype definition. |
Returns
StorageShape is returned, indicating the storage shape of the output tensor.
Constraints
Do not modify the returned StorageShape or attempt to release it.
Examples
gert::StorageShape* GetOutputShape(OpCheckContext* context) {
int64_t index = 9;
gert::StorageShape* shape = context->GetOutputShape(index);
...
}
Parent topic: OpCheckContext