normalize

fun normalize(type: Pipeline.NormalizeType, source: Tensor, alphaBeta: Tensor?, result: Tensor)

Normalize a tensor.

Parameters

type

normalization type.

source

input tensor, to be normalized. It must be a multi-dimensional tensor.

alphaBeta

an optional tensor, to specify the alpha and beta values for the normalization. The tensor must have two values, whatever the usage it is. The first value will be read as alpha, and the second as beta. If not provided, the default alpha and beta will be 1.0 and 0.0 respectively. The data type must be 32-/64-bit float.

result

the required tensor, to store the normalized result of the input source. It must be a multi-dimensional tensor, with the same data type, number of channel and dimensions as source, i.e., they must be created with the same Tensor.InitInfo.