module onnxrt.ops_cpu.op_binarizer#

Inheritance diagram of mlprodict.onnxrt.ops_cpu.op_binarizer

Short summary#

module mlprodict.onnxrt.ops_cpu.op_binarizer

Runtime operator.

source on GitHub

Classes#

class

truncated documentation

Binarizer

Binarizer (ai.onnx.ml) ====================== Maps the values of the input tensor to either 0 or 1, element-wise, based …

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__

_run

Documentation#

Runtime operator.

source on GitHub

class mlprodict.onnxrt.ops_cpu.op_binarizer.Binarizer(ai.onnx.ml)#

Bases: OpRunUnaryNum


Maps the values of the input tensor to either 0 or 1, element-wise, based on the outcome of a comparison against a threshold value.

Attributes

  • threshold: Values greater than this are mapped to 1, others to 0. Default value is namethresholdf0.0typeFLOAT (FLOAT)

Inputs

  • X (heterogeneous)T: Data to be binarized

Outputs

  • Y (heterogeneous)T: Binarized output data

Type Constraints

  • T tensor(float), tensor(double), tensor(int64), tensor(int32): The input must be a tensor of a numeric type. The output will be of the same tensor type.

Version

Onnx name: Binarizer

This version of the operator has been available since version 1 of domain ai.onnx.ml.

Runtime implementation: Binarizer

__init__(onnx_node, desc=None, **options)#
_run(x, attributes=None, verbose=0, fLOG=None)#

Should be overwritten.

source on GitHub