(l-onnx-doc-Size)= # Size (l-onnx-op-size-23)= ## Size - 23 ### Version - **name**: [Size (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Size) - **domain**: `main` - **since_version**: `23` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 23**. ### Summary Takes a tensor as input and outputs a int64 scalar that equals to the total number of elements of the input tensor. ### Inputs - **data** (heterogeneous) - **T**: An input tensor. ### Outputs - **size** (heterogeneous) - **T1**: Total number of elements of the input tensor ### Type Constraints * **T** in ( `tensor(bfloat16)`, `tensor(bool)`, `tensor(complex128)`, `tensor(complex64)`, `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(float4e2m1)`, `tensor(float8e4m3fn)`, `tensor(float8e4m3fnuz)`, `tensor(float8e5m2)`, `tensor(float8e5m2fnuz)`, `tensor(int16)`, `tensor(int32)`, `tensor(int4)`, `tensor(int64)`, `tensor(int8)`, `tensor(string)`, `tensor(uint16)`, `tensor(uint32)`, `tensor(uint4)`, `tensor(uint64)`, `tensor(uint8)` ): Input tensor can be of arbitrary type. * **T1** in ( `tensor(int64)` ): Constrain output to int64 tensor, which should be a scalar though. ```{toctree} text_diff_Size_21_23 ``` (l-onnx-op-size-21)= ## Size - 21 ### Version - **name**: [Size (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Size) - **domain**: `main` - **since_version**: `21` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 21**. ### Summary Takes a tensor as input and outputs a int64 scalar that equals to the total number of elements of the input tensor. ### Inputs - **data** (heterogeneous) - **T**: An input tensor. ### Outputs - **size** (heterogeneous) - **T1**: Total number of elements of the input tensor ### Type Constraints * **T** in ( `tensor(bfloat16)`, `tensor(bool)`, `tensor(complex128)`, `tensor(complex64)`, `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(float8e4m3fn)`, `tensor(float8e4m3fnuz)`, `tensor(float8e5m2)`, `tensor(float8e5m2fnuz)`, `tensor(int16)`, `tensor(int32)`, `tensor(int4)`, `tensor(int64)`, `tensor(int8)`, `tensor(string)`, `tensor(uint16)`, `tensor(uint32)`, `tensor(uint4)`, `tensor(uint64)`, `tensor(uint8)` ): Input tensor can be of arbitrary type. * **T1** in ( `tensor(int64)` ): Constrain output to int64 tensor, which should be a scalar though. ```{toctree} text_diff_Size_19_23 text_diff_Size_19_21 ``` (l-onnx-op-size-19)= ## Size - 19 ### Version - **name**: [Size (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Size) - **domain**: `main` - **since_version**: `19` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 19**. ### Summary Takes a tensor as input and outputs a int64 scalar that equals to the total number of elements of the input tensor. ### Inputs - **data** (heterogeneous) - **T**: An input tensor. ### Outputs - **size** (heterogeneous) - **T1**: Total number of elements of the input tensor ### Type Constraints * **T** in ( `tensor(bfloat16)`, `tensor(bool)`, `tensor(complex128)`, `tensor(complex64)`, `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(float8e4m3fn)`, `tensor(float8e4m3fnuz)`, `tensor(float8e5m2)`, `tensor(float8e5m2fnuz)`, `tensor(int16)`, `tensor(int32)`, `tensor(int64)`, `tensor(int8)`, `tensor(string)`, `tensor(uint16)`, `tensor(uint32)`, `tensor(uint64)`, `tensor(uint8)` ): Input tensor can be of arbitrary type. * **T1** in ( `tensor(int64)` ): Constrain output to int64 tensor, which should be a scalar though. ```{toctree} text_diff_Size_13_23 text_diff_Size_13_21 text_diff_Size_13_19 ``` (l-onnx-op-size-13)= ## Size - 13 ### Version - **name**: [Size (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Size) - **domain**: `main` - **since_version**: `13` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 13**. ### Summary Takes a tensor as input and outputs a int64 scalar that equals to the total number of elements of the input tensor. ### Inputs - **data** (heterogeneous) - **T**: An input tensor. ### Outputs - **size** (heterogeneous) - **T1**: Total number of elements of the input tensor ### Type Constraints * **T** in ( `tensor(bfloat16)`, `tensor(bool)`, `tensor(complex128)`, `tensor(complex64)`, `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(int16)`, `tensor(int32)`, `tensor(int64)`, `tensor(int8)`, `tensor(string)`, `tensor(uint16)`, `tensor(uint32)`, `tensor(uint64)`, `tensor(uint8)` ): Input tensor can be of arbitrary type. * **T1** in ( `tensor(int64)` ): Constrain output to int64 tensor, which should be a scalar though. ```{toctree} text_diff_Size_1_23 text_diff_Size_1_21 text_diff_Size_1_19 text_diff_Size_1_13 ``` (l-onnx-op-size-1)= ## Size - 1 ### Version - **name**: [Size (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Size) - **domain**: `main` - **since_version**: `1` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 1**. ### Summary Takes a tensor as input and outputs a int64 scalar that equals to the total number of elements of the input tensor. ### Inputs - **data** (heterogeneous) - **T**: An input tensor. ### Outputs - **size** (heterogeneous) - **T1**: Total number of elements of the input tensor ### Type Constraints * **T** in ( `tensor(bool)`, `tensor(complex128)`, `tensor(complex64)`, `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(int16)`, `tensor(int32)`, `tensor(int64)`, `tensor(int8)`, `tensor(string)`, `tensor(uint16)`, `tensor(uint32)`, `tensor(uint64)`, `tensor(uint8)` ): Input tensor can be of arbitrary type. * **T1** in ( `tensor(int64)` ): Constrain output to int64 tensor, which should be a scalar though.