ai.onnx.ml - Normalizer¶
Normalizer - 1 (ai.onnx.ml)¶
版本¶
域:
ai.onnx.ml
起始版本:
1
函数:
False
支持级别:
SupportType.COMMON
形状推断:
False
该算子的此版本**自 ai.onnx.ml 域的 1 版本起**可用。
摘要¶
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)}
在所有模式下,如果除数为零,则 Y == X。
对于批次,即 [N,C] 张量,归一化沿 C 轴进行。换句话说,批次的每一行都独立进行归一化。
属性¶
norm - STRING (默认为
'MAX'
)‘MAX,’ ‘L1,’ ‘L2’ 中的一个
输入¶
X (异构) - T
待编码的数据,形状为 [N,C] 或 [C] 的张量
输出¶
Y (异构) - tensor(float)
编码后的输出数据
类型约束¶
T 在 (
tensor(double)
,tensor(float)
,tensor(int32)
,tensor(int64)
) 中输入必须是数值类型的张量。