ai.onnx.ml - Normalizer

Normalizer - 1 (ai.onnx.ml)

版本

  • 名稱Normalizer (GitHub)

  • ai.onnx.ml

  • since_version1

  • 函數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 in ( tensor(double), tensor(float), tensor(int32), tensor(int64) )

    輸入必須是數值類型的張量。