ClikaRT::ops::batch_norm
function
batch_norm()
Tensor batch_norm(
Tensor x,
OptionalTensor weight = {},
OptionalTensor bias = {},
OptionalTensor running_mean = {},
OptionalTensor running_var = {},
std::optional<double> eps = std::nullopt,
std::optional<Activation> activation = std::nullopt
)
Per-channel batch normalization (inference form), channels-last.
x is [N, *spatial, C]; every operand is per-channel [C]. The supplied running_mean / running_var ARE the statistics (inference only; no training mode, no momentum). Optional fused activation applies to the result.
Parameters
x: the input,[N, *spatial, C].weight: optional per-channel scale[C].bias: optional per-channel shift[C].running_mean: per-channel mean[C].running_var: per-channel variance[C].eps: stability floor;std::nulloptselects 1e-5.activation: optional fused activation; absent = none.
Returns: a new tensor, same shape and dtype as x.
Throws
ClikaRT::Error: (INVALID_ARGUMENT) when a per-channel operand does not matchC.
Declared in ClikaRT/compute/ops.h, line 3594