module onnxrt.ops_cpu.op_global_average_pool
#
Short summary#
module mlprodict.onnxrt.ops_cpu.op_global_average_pool
Runtime operator.
Classes#
class |
truncated documentation |
---|---|
GlobalAveragePool ================= GlobalAveragePool consumes an input tensor X and applies average pooling across the … |
Functions#
function |
truncated documentation |
---|---|
Properties#
property |
truncated documentation |
---|---|
|
Returns the list of arguments as well as the list of parameters with the default values (close to the signature). … |
|
Returns the list of modified parameters. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns all parameters in a dictionary. |
Methods#
method |
truncated documentation |
---|---|
Documentation#
Runtime operator.
- class mlprodict.onnxrt.ops_cpu.op_global_average_pool.GlobalAveragePool(onnx_node, desc=None, **options)#
Bases:
mlprodict.onnxrt.ops_cpu._op.OpRun
GlobalAveragePool consumes an input tensor X and applies average pooling across the values in the same channel. This is equivalent to AveragePool with kernel size equal to the spatial dimension of input tensor.
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 tensor(float16), tensor(float), tensor(double): Constrain input and output types to float tensors.
Version
Onnx name: GlobalAveragePool
This version of the operator has been available since version 1.
Runtime implementation:
GlobalAveragePool
- Parameters
onnx_node – onnx node
desc – internal representation
expected_attributes – expected attributes for this node
options – runtime options
- __init__(onnx_node, desc=None, **options)#
- Parameters
onnx_node – onnx node
desc – internal representation
expected_attributes – expected attributes for this node
options – runtime options
- _infer_shapes(x)#
Should be overwritten.
- _infer_sizes(*args)#
Should be overwritten.
- _infer_types(x)#
Should be overwritten.
- _run(x)#
Should be overwritten.
- mlprodict.onnxrt.ops_cpu.op_global_average_pool._global_average_pool(x)#