From 48ed93cdaa522a0982bbfe8f97982e021e268f05 Mon Sep 17 00:00:00 2001 From: thebhatman Date: Wed, 12 Jun 2019 23:16:15 +0530 Subject: [PATCH] Silly error in Dropout corrected. --- src/layers/normalise.jl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/layers/normalise.jl b/src/layers/normalise.jl index c3a144f4..1adc3050 100644 --- a/src/layers/normalise.jl +++ b/src/layers/normalise.jl @@ -15,10 +15,11 @@ Does nothing to the input once in [`testmode!`](@ref). mutable struct Dropout{F} p::F dims::Union{Colon, Int, NTuple{N, Int} where N} - function Dropout(p; dims = :) - @assert 0 ≤ p ≤ 1 - Dropout{typeof(p)}(p, dims) - end +end + +function Dropout(p; dims = :) + @assert 0 ≤ p ≤ 1 + Dropout{typeof(p)}(p, dims) end _dropout_shape(s, ::Colon) = size(s)