module onnxrt.ops_cpu.op_round
#
Short summary#
module mlprodict.onnxrt.ops_cpu.op_round
Runtime operator.
Classes#
class |
truncated documentation |
---|---|
Round ===== Round takes one input Tensor and rounds the values, element-wise, meaning it finds the nearest integer for … |
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_round.Round(onnx_node, desc=None, **options)#
Bases:
OpRunUnaryNum
Round takes one input Tensor and rounds the values, element-wise, meaning it finds the nearest integer for each value. In case of halfs, the rule is to round them to the nearest even integer. The output tensor has the same shape and type as the input.
Examples: `` round([0.9]) = [1.0] round([2.5]) = [2.0] round([2.3]) = [2.0] round([1.5]) = [2.0] round([-4.5]) = [-4.0] ``
Inputs
X (heterogeneous)T: Input tensor
Outputs
Y (heterogeneous)T: Output tensor
Type Constraints
T tensor(float16), tensor(float), tensor(double): Constrain input and output types to float tensors.
Version
Onnx name: Round
This version of the operator has been available since version 11.
Runtime implementation:
Round
- __init__(onnx_node, desc=None, **options)#
- _run(x, attributes=None, verbose=0, fLOG=None)#
Should be overwritten.
- _run_inplace(x)#
- to_python(inputs)#
Returns a python code equivalent to this operator.
- Parameters:
inputs – inputs name
- Returns:
imports, python code, both as strings