module onnxrt.ops_cpu.op_reduce_sum#

Inheritance diagram of mlprodict.onnxrt.ops_cpu.op_reduce_sum

Short summary#

module mlprodict.onnxrt.ops_cpu.op_reduce_sum

Runtime operator.

source on GitHub

Classes#

class

truncated documentation

ReduceSum_1

ReduceSum_11

ReduceSum_13

ReduceSum ========= Computes the sum of the input tensor’s element along the provided axes. The resulted tensor has the …

ReduceSum_13

ReduceSum ========= Computes the sum of the input tensor’s element along the provided axes. The resulted tensor has the …

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

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

args_default

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

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_default_modified

Returns the list of modified parameters.

args_default_modified

Returns the list of modified parameters.

args_default_modified

Returns the list of modified parameters.

args_mandatory

Returns the list of optional arguments.

args_mandatory

Returns the list of optional arguments.

args_mandatory

Returns the list of optional arguments.

args_mandatory

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

atts_value

Returns all parameters in a dictionary.

atts_value

Returns all parameters in a dictionary.

atts_value

Returns all parameters in a dictionary.

atts_value

Returns all parameters in a dictionary.

Methods#

method

truncated documentation

__init__

__init__

__init__

__init__

_infer_shapes

Returns the same shape by default.

_infer_shapes

Returns the same shape by default.

_infer_sizes

_infer_sizes

_infer_types

_infer_types

_run

_run

_run

_run

_run_no_checks_

_run_no_checks_

infer_shapes

infer_shapes

infer_types

infer_types

run

Calls method _run.

run

Calls method _run.

Documentation#

Runtime operator.

source on GitHub

mlprodict.onnxrt.ops_cpu.op_reduce_sum.ReduceSum#

alias of mlprodict.onnxrt.ops_cpu.op_reduce_sum.ReduceSum_13

class mlprodict.onnxrt.ops_cpu.op_reduce_sum.ReduceSum_1(onnx_node, desc=None, **options)#

Bases: mlprodict.onnxrt.ops_cpu._op.OpRunReduceNumpy

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

_run(data)#

Should be overwritten.

source on GitHub

class mlprodict.onnxrt.ops_cpu.op_reduce_sum.ReduceSum_11(onnx_node, desc=None, **options)#

Bases: mlprodict.onnxrt.ops_cpu.op_reduce_sum.ReduceSum_1

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

class mlprodict.onnxrt.ops_cpu.op_reduce_sum.ReduceSum_13(onnx_node, desc=None, **options)#

Bases: mlprodict.onnxrt.ops_cpu._op.OpRunReduceNumpy

Computes the sum of the input tensor’s element along the provided axes. The resulted tensor has the same rank as the input if keepdims equal 1. If keepdims equal 0, then the resulted tensor have the reduced dimension pruned.

The above behavior is similar to numpy, with the exception that numpy default keepdims to False instead of True.

Attributes

  • keepdims: Keep the reduced dimension or not, default 1 mean keep reduced dimension. Default value is namekeepdimsi1typeINT (INT)

  • noop_with_empty_axes: Defines behaviour if ‘axes’ is empty. Default behaviour with ‘false’ is to reduce all axes. When axes is empty and this attribute is set to true, input tensor will not be reduced,and the output tensor would be equivalent to input tensor. Default value is namenoopwithemptyaxesi0typeINT (INT)

Inputs

Between 1 and 2 inputs.

  • data (heterogeneous)T: An input tensor.

  • axes (optional, heterogeneous)tensor(int64): Optional input list of integers, along which to reduce. The default is to reduce over all the dimensions of the input tensor if ‘noop_with_empty_axes’ is false, else act as an Identity op when ‘noop_with_empty_axes’ is true. Accepted range is [-r, r-1] where r = rank(data).

Outputs

  • reduced (heterogeneous)T: Reduced output tensor.

Type Constraints

  • T tensor(uint32), tensor(uint64), tensor(int32), tensor(int64), tensor(float16), tensor(float), tensor(double), tensor(bfloat16): Constrain input and output types to high-precision numeric tensors.

Version

Onnx name: ReduceSum

This version of the operator has been available since version 13.

Runtime implementation: ReduceSum

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(data, axes=None)#

Returns the same shape by default.

source on GitHub

_infer_sizes(*args, **kwargs)#

Should be overwritten.

source on GitHub

_infer_types(data, axes=None)#

Returns the same type by default.

source on GitHub

_run(data, axes=None)#

Should be overwritten.

source on GitHub

_run_no_checks_(x, axes=None)#
infer_shapes(data, axes=None)#

Infer shapes of the outputs given the shapes of the inputs. It works the same way as method run.

source on GitHub

infer_types(data, axes=None)#

Infer types of the outputs given the types of the inputs. It works the same way as method run.

source on GitHub

run(data, axes=None)#

Calls method _run.

source on GitHub