diff --git a/Project.toml b/Project.toml index e0360cea98..992babd3b7 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Flux" uuid = "587475ba-b771-5e3f-ad9e-33799f191a9c" -version = "0.13.2" +version = "0.13.3" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" diff --git a/src/layers/normalise.jl b/src/layers/normalise.jl index 1a51615f6f..d9e0f63cf4 100644 --- a/src/layers/normalise.jl +++ b/src/layers/normalise.jl @@ -195,7 +195,7 @@ function _norm_layer_forward( σ² = reshape(l.σ², stats_shape) else # trainmode or testmode without tracked stats μ = mean(x; dims=reduce_dims) - σ² = mean((x .- μ).^2; dims=reduce_dims) + σ² = var(x; mean=μ, dims=reduce_dims, corrected=false) if l.track_stats _track_stats!(l, x, μ, σ², reduce_dims) # update moving mean/std end