2021-12-21 20:26:37 +03:00
# ShapeOf {#openvino_docs_ops_shape_ShapeOf_3}
2020-06-19 14:39:57 +03:00
2023-04-24 11:02:30 +02:00
@sphinxdirective
2020-06-19 14:39:57 +03:00
**Versioned name** : *ShapeOf-3*
2021-08-23 12:12:46 +02:00
**Category** : *Shape manipulation*
2020-06-19 14:39:57 +03:00
**Short description** : *ShapeOf* produces 1D tensor with the input tensor shape.
**Attributes** :
* *output_type*
* **Description**: the output tensor type
* **Range of values**: "i64" or "i32"
* **Type**: string
* **Default value**: "i64"
2021-07-15 09:17:23 +02:00
* **Required**: *no*
2020-06-19 14:39:57 +03:00
**Inputs** :
2021-07-15 09:17:23 +02:00
* **1** : Arbitrary input tensor of type *T* . **Required.**
2020-06-19 14:39:57 +03:00
**Outputs** :
* **1** : 1D tensor that is equal to input tensor shape of type *T_IND* . Number of elements is equal to input tensor rank. Can be empty 1D tensor if input tensor is a scalar, that mean 0-dimensional tensor.
**Types**
* *T*: any numeric type.
2023-04-24 11:02:30 +02:00
* *T_IND*: ``int64`` or ``int32` `.
2020-06-19 14:39:57 +03:00
**Example**
2023-04-24 11:02:30 +02:00
.. code-block:: cpp
<layer ... type="ShapeOf">
<data output_type="i64"/>
<input>
<port id="0">
<dim>2</dim>
<dim>3</dim>
<dim>224</dim>
<dim>224</dim>
</port>
</input>
<output>
<port id="1"> < !-- output value is: [2,3,224,224]-->
<dim>4</dim>
</port>
</output>
</layer>
@endsphinxdirective