From 2660af7f6a9ac243a8ad38bf3375ef0fd292bf52 Mon Sep 17 00:00:00 2001 From: Qi Liu Date: Fri, 11 Mar 2016 21:45:49 +0800 Subject: fix bug of dropout --- nerv/layer/dropout.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nerv') diff --git a/nerv/layer/dropout.lua b/nerv/layer/dropout.lua index 39a8963..de0fb64 100644 --- a/nerv/layer/dropout.lua +++ b/nerv/layer/dropout.lua @@ -40,7 +40,7 @@ function DropoutLayer:propagate(input, output, t) if t == nil then t = 1 end - if self.gconf.dropout_rate ~= 0 then + if self.gconf.dropout_rate then self.mask[t]:rand_uniform() -- since we will lose a portion of the actvations, we multiply the -- activations by 1 / (1 - rate) to compensate -- cgit v1.2.3