ai.onnx.ml - Normalizer

Normalizer - 1 (ai.onnx.ml)

版本

  • 名称: Normalizer (GitHub)

  • : 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>

最大值: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) ) 中

    输入必须是数值类型的张量。