Prevent breakage due to new `active` field in BatchNorm

This commit is contained in:
Ian 2020-03-03 11:49:34 -05:00
parent 19a034b215
commit 0def352383
1 changed files with 2 additions and 0 deletions

View File

@ -157,6 +157,8 @@ mutable struct BatchNorm{F,V,W,N}
active::Union{Bool, Nothing} active::Union{Bool, Nothing}
end end
BatchNorm(λ, β, γ, μ, σ², ϵ, momentum) = BatchNorm(λ, β, γ, μ, σ², ϵ, momentum, nothing)
BatchNorm(chs::Integer, λ = identity; BatchNorm(chs::Integer, λ = identity;
initβ = (i) -> zeros(Float32, i), initγ = (i) -> ones(Float32, i), ϵ = 1f-5, momentum = 0.1f0) = initβ = (i) -> zeros(Float32, i), initγ = (i) -> ones(Float32, i), ϵ = 1f-5, momentum = 0.1f0) =
BatchNorm(λ, initβ(chs), initγ(chs), BatchNorm(λ, initβ(chs), initγ(chs),