From 0def3523839f319e7b6b0e0f5343df657060fa72 Mon Sep 17 00:00:00 2001 From: Ian Date: Tue, 3 Mar 2020 11:49:34 -0500 Subject: [PATCH] Prevent breakage due to new `active` field in BatchNorm --- src/layers/normalise.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/layers/normalise.jl b/src/layers/normalise.jl index fc781f70..0647e6b4 100644 --- a/src/layers/normalise.jl +++ b/src/layers/normalise.jl @@ -157,6 +157,8 @@ mutable struct BatchNorm{F,V,W,N} active::Union{Bool, Nothing} end +BatchNorm(λ, β, γ, μ, σ², ϵ, momentum) = BatchNorm(λ, β, γ, μ, σ², ϵ, momentum, nothing) + BatchNorm(chs::Integer, λ = identity; initβ = (i) -> zeros(Float32, i), initγ = (i) -> ones(Float32, i), ϵ = 1f-5, momentum = 0.1f0) = BatchNorm(λ, initβ(chs), initγ(chs),