module onnxrt.ops_cpu.op_global_average_pool#

Inheritance diagram of mlprodict.onnxrt.ops_cpu.op_global_average_pool

Short summary#

module mlprodict.onnxrt.ops_cpu.op_global_average_pool

Runtime operator.

source on GitHub

Classes#

class

truncated documentation

GlobalAveragePool

GlobalAveragePool ================= GlobalAveragePool consumes an input tensor X and applies average pooling across the …

Functions#

function

truncated documentation

_global_average_pool

Properties#

property

truncated documentation

args_default

Returns the list of arguments as well as the list of parameters with the default values (close to the signature). …

args_default_modified

Returns the list of modified parameters.

args_mandatory

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

atts_value

Returns all parameters in a dictionary.

Methods#

method

truncated documentation

__init__

_infer_shapes

_infer_sizes

_infer_types

_run

Documentation#

Runtime operator.

source on GitHub

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_nodeonnx node

  • desc – internal representation

  • expected_attributes – expected attributes for this node

  • options – runtime options

source on GitHub

__init__(onnx_node, desc=None, **options)#
Parameters
  • onnx_nodeonnx node

  • desc – internal representation

  • expected_attributes – expected attributes for this node

  • options – runtime options

source on GitHub

_infer_shapes(x)#

Should be overwritten.

source on GitHub

_infer_sizes(*args)#

Should be overwritten.

source on GitHub

_infer_types(x)#

Should be overwritten.

source on GitHub

_run(x)#

Should be overwritten.

source on GitHub

mlprodict.onnxrt.ops_cpu.op_global_average_pool._global_average_pool(x)#