use uncorrected standard deviation in normalise

fixes https://github.com/FluxML/Flux.jl/issues/529
This commit is contained in:
Kristoffer Carlsson 2019-01-30 17:42:19 +01:00 committed by GitHub
parent 0469394715
commit fd0f1c7a82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,6 +46,6 @@ Normalise each column of `x` to mean 0 and standard deviation 1.
"""
function normalise(x::AbstractVecOrMat)
μ′ = mean(x, dims = 1)
σ = std(x, dims = 1, mean = μ′)
σ = std(x, dims = 1, mean = μ′, corrected=false)
return (x .- μ′) ./ σ
end