module onnxrt.ops_cpu.op_sign
#
Short summary#
module mlprodict.onnxrt.ops_cpu.op_sign
Runtime operator.
Classes#
class |
truncated documentation |
---|---|
Sign ==== Calculate the sign of the given input tensor element-wise. If input > 0, output 1. if input < 0, output -1. … |
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_sign.Sign(onnx_node, desc=None, **options)#
Bases:
OpRunUnaryNum
Calculate the sign of the given input tensor element-wise. If input > 0, output 1. if input < 0, output -1. if input == 0, output 0.
Inputs
input (heterogeneous)T: Input tensor
Outputs
output (heterogeneous)T: The sign of the input tensor computed element-wise. It has the same shape and type of the input.
Type Constraints
T tensor(uint8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(int8), tensor(int16), tensor(int32), tensor(int64), tensor(float16), tensor(float), tensor(double), tensor(bfloat16): Constrain input and output types to all numeric tensors.
Version
Onnx name: Sign
This version of the operator has been available since version 13.
Runtime implementation:
Sign
- __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