1.0 compat for normalise
This commit is contained in:
parent
5e4ee827e9
commit
e7783ace12
@ -47,7 +47,7 @@ logitbinarycrossentropy(logŷ, y) = (1 - y)*logŷ - logσ(logŷ)
|
|||||||
Normalise each column of `x` to mean 0 and standard deviation 1.
|
Normalise each column of `x` to mean 0 and standard deviation 1.
|
||||||
"""
|
"""
|
||||||
function normalise(x::AbstractVecOrMat)
|
function normalise(x::AbstractVecOrMat)
|
||||||
μ′ = mean(x, 1)
|
μ′ = mean(x, dims = 1)
|
||||||
σ′ = std(x, 1, mean = μ′)
|
σ′ = std(x, dims = 1, mean = μ′)
|
||||||
return (x .- μ′) ./ σ′
|
return (x .- μ′) ./ σ′
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user