ai.onnx.ml - Normalizer¶
Normalizer - 1 (ai.onnx.ml)¶
Version¶
name: Normalizer (GitHub)
domain:
ai.onnx.mlsince_version:
1function:
Falsesupport_level:
SupportType.COMMONshape inference:
False
This version of the operator has been available since version 1 of domain ai.onnx.ml.
Summary¶
Normalize the input. There are three normalization modes, which have the corresponding formulas,
defined using element-wise infix operators '/' and '^' and tensor-wide functions 'max' and 'sum':<br>
Max: Y = X / max(X)
L1: Y = X / sum(X)
L2: Y = sqrt(X^2 / sum(X^2)}
In all modes, if the divisor is zero, Y == X.
For batches, that is, [N,C] tensors, normalization is done along the C axis. In other words, each row of the batch is normalized independently.
Attributes¶
norm - STRING (default is
'MAX'):One of ‘MAX,’ ‘L1,’ ‘L2’
Inputs¶
X (heterogeneous) - T:
Data to be encoded, a tensor of shape [N,C] or [C]
Outputs¶
Y (heterogeneous) - tensor(float):
Encoded output data
Type Constraints¶
T in (
tensor(double),tensor(float),tensor(int32),tensor(int64)):The input must be a tensor of a numeric type.