oa::ml::matrix::batch_norm_2d_with_stats

Normalize an NCHW Matrix using explicit per-channel statistics. This is the stateless inference form used by crate::ml::nn::BatchNorm2d in evaluation mode. Errors Returns an error unless every value is same-engine F32, the channel-vector shapes match the input, epsilon is finite and positive, or runtime recording fails.

FnRust public API

Function Documentation

pub fn batch_norm_2d_with_stats( input: &Matrix, mean: &Matrix, variance: &Matrix, weight: &Matrix, bias: &Matrix, epsilon: f32 ) -> Result<Matrix>
Normalize an NCHW Matrix using explicit per-channel statistics. This is the stateless inference form used by crate::ml::nn::BatchNorm2d in evaluation mode. Errors Returns an error unless every value is same-engine F32, the channel-vector shapes match the input, epsilon is finite and positive, or runtime recording fails.