GlobalLpPool#

GlobalLpPool - 2#

Version

  • name: GlobalLpPool (GitHub)

  • 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: p value of the Lp norm used to pool over the input data. Default value is 2.

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.

Examples

Differences

00GlobalLpPool consumes an input tensor X and applies lp pool pooling across theGlobalLpPool consumes an input tensor X and applies lp pool pooling across
11the values in the same channel. This is equivalent to LpPool with kernel sizethe values in the same channel. This is equivalent to LpPool with kernel size
22equal to the spatial dimension of input tensor.equal to the spatial dimension of input tensor.
33
44**Attributes****Attributes**
55
66* **p**:* **p**:
77 p value of the Lp norm used to pool over the input data, default is p value of the Lp norm used to pool over the input data. Default value is 2.
8 2.0. Default value is 2.0.
98
109**Inputs****Inputs**
1110
1211* **X** (heterogeneous) - **T**:* **X** (heterogeneous) - **T**:
1312 Input data tensor from the previous operator; dimensions for image Input data tensor from the previous operator; dimensions for image
1413 case are (N x C x H x W), where N is the batch size, C is the number case are (N x C x H x W), where N is the batch size, C is the number
1514 of channels, and H and W are the height and the width of the data. of channels, and H and W are the height and the width of the data.
1615 For non image case, the dimension are in the form of (N x C x D1 x For non image case, the dimensions are in the form of (N x C x D1 x
1716 D2 ... Dn), where N is the batch size. D2 ... Dn), where N is the batch size.
1817
1918**Outputs****Outputs**
2019
2120* **Y** (heterogeneous) - **T**:* **Y** (heterogeneous) - **T**:
2221 Output data tensor from pooling across the input tensor. Dimensions Output data tensor from pooling across the input tensor. The output
2322 will be N x C x 1 x 1 tensor has the same rank as the input. The first two dimensions of
23 output shape are the same as the input (N x C), while the other
24 dimensions are all 1.
2425
2526**Type Constraints****Type Constraints**
2627
2728* **T** in (* **T** in (
2829 tensor(double), tensor(double),
2930 tensor(float), tensor(float),
3031 tensor(float16) tensor(float16)
3132 ): ):
3233 Constrain input and output types to float tensors. Constrain input and output types to float tensors.

GlobalLpPool - 1#

Version

  • name: GlobalLpPool (GitHub)

  • 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: p value of the Lp norm used to pool over the input data, default is 2.0. Default value 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.