oa::ml::matrix::batch_norm_2d

Normalize an NCHW Matrix using statistics computed from the current batch. Errors Returns an error unless input is nonempty rank-four F32, weight and bias are same-engine F32 channel vectors, epsilon is finite and positive, or runtime recording fails.

FnRust public API

Function Documentation

pub fn batch_norm_2d( input: &Matrix, weight: &Matrix, bias: &Matrix, epsilon: f32 ) -> Result<BatchNorm2dResult>
Normalize an NCHW Matrix using statistics computed from the current batch. Errors Returns an error unless input is nonempty rank-four F32, weight and bias are same-engine F32 channel vectors, epsilon is finite and positive, or runtime recording fails.