(l-onnx-doc-GlobalLpPool)=
# GlobalLpPool
(l-onnx-op-globallppool-22)=
## GlobalLpPool - 22
### Version
- **name**: [GlobalLpPool (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#GlobalLpPool)
- **domain**: `main`
- **since_version**: `22`
- **function**: `False`
- **support_level**: `SupportType.COMMON`
- **shape inference**: `True`
This version of the operator has been available
**since version 22**.
### Summary
GlobalLpPool consumes an input tensor X and applies lp pool pooling across
the values in the same channel. This is equivalent to LpPool with kernel size
equal to the spatial dimension of input tensor.
### Attributes
* **p - INT** (default is `'2'`):
p value of the Lp norm used to pool over the input data.
### Inputs
- **X** (heterogeneous) - **T**:
Input data tensor from the previous operator; dimensions for image case are (N x C x H x W), where N is the batch size, C is the number of channels, and H and W are the height and the width of the data. For non image case, the dimensions are in the form of (N x C x D1 x D2 ... Dn), where N is the batch size.
### Outputs
- **Y** (heterogeneous) - **T**:
Output data tensor from pooling across the input tensor. The output tensor has the same rank as the input. The first two dimensions of output shape are the same as the input (N x C), while the other dimensions are all 1.
### Type Constraints
* **T** in ( `tensor(double)`, `tensor(float)`, `tensor(float16)` ):
Constrain input and output types to float tensors.
```{toctree}
text_diff_GlobalLpPool_2_22
```
(l-onnx-op-globallppool-2)=
## GlobalLpPool - 2
### Version
- **name**: [GlobalLpPool (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#GlobalLpPool)
- **domain**: `main`
- **since_version**: `2`
- **function**: `False`
- **support_level**: `SupportType.COMMON`
- **shape inference**: `True`
This version of the operator has been available
**since version 2**.
### Summary
GlobalLpPool consumes an input tensor X and applies lp pool pooling across
the values in the same channel. This is equivalent to LpPool with kernel size
equal to the spatial dimension of input tensor.
### Attributes
* **p - INT** (default is `'2'`):
p value of the Lp norm used to pool over the input data.
### Inputs
- **X** (heterogeneous) - **T**:
Input data tensor from the previous operator; dimensions for image case are (N x C x H x W), where N is the batch size, C is the number of channels, and H and W are the height and the width of the data. For non image case, the dimensions are in the form of (N x C x D1 x D2 ... Dn), where N is the batch size.
### Outputs
- **Y** (heterogeneous) - **T**:
Output data tensor from pooling across the input tensor. The output tensor has the same rank as the input. The first two dimensions of output shape are the same as the input (N x C), while the other dimensions are all 1.
### Type Constraints
* **T** in ( `tensor(bfloat16)`, `tensor(double)`, `tensor(float)`, `tensor(float16)` ):
Constrain input and output types to float tensors.
```{toctree}
text_diff_GlobalLpPool_1_22
text_diff_GlobalLpPool_1_2
```
(l-onnx-op-globallppool-1)=
## GlobalLpPool - 1
### Version
- **name**: [GlobalLpPool (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#GlobalLpPool)
- **domain**: `main`
- **since_version**: `1`
- **function**: `False`
- **support_level**: `SupportType.COMMON`
- **shape inference**: `False`
This version of the operator has been available
**since version 1**.
### Summary
GlobalLpPool consumes an input tensor X and applies lp pool pooling across the
the values in the same channel. This is equivalent to LpPool with kernel size
equal to the spatial dimension of input tensor.
### Attributes
* **p - FLOAT** (default is `'2.0'`):
p value of the Lp norm used to pool over the input data, default is 2.0.
### Inputs
- **X** (heterogeneous) - **T**:
Input data tensor from the previous operator; dimensions for image case are (N x C x H x W), where N is the batch size, C is the number of channels, and H and W are the height and the width of the data. For non image case, the dimension are in the form of (N x C x D1 x D2 ... Dn), where N is the batch size.
### Outputs
- **Y** (heterogeneous) - **T**:
Output data tensor from pooling across the input tensor. Dimensions will be N x C x 1 x 1
### Type Constraints
* **T** in ( `tensor(double)`, `tensor(float)`, `tensor(float16)` ):
Constrain input and output types to float tensors.