From bd7e3b1f41c0a63d7a0ef6f456a540f73f8d84d2 Mon Sep 17 00:00:00 2001 From: thebhatman Date: Wed, 12 Jun 2019 22:16:11 +0530 Subject: [PATCH] Dropout with dims test passing. --- src/layers/normalise.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/layers/normalise.jl b/src/layers/normalise.jl index 082e651e..95599867 100644 --- a/src/layers/normalise.jl +++ b/src/layers/normalise.jl @@ -14,9 +14,10 @@ Does nothing to the input once in [`testmode!`](@ref). """ mutable struct Dropout{F} p::F - function Dropout(p) + dims::Union{Colon, Int, NTuple{N, Int} where N} + function Dropout(p; dims = :) @assert 0 ≤ p ≤ 1 - new{typeof(p)}(p) + Dropout{typeof(p)}(p, dims) end end