From 71edc0214cd5001fb913a160c67418c684471115 Mon Sep 17 00:00:00 2001 From: radioman Date: Fri, 25 Nov 2016 00:11:02 +0200 Subject: [PATCH] fix https://github.com/karpathy/convnetjs/pull/61 --- src/ConvNetSharp/Layers/DropOutLayer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ConvNetSharp/Layers/DropOutLayer.cs b/src/ConvNetSharp/Layers/DropOutLayer.cs index 9e934edc..7df71d12 100644 --- a/src/ConvNetSharp/Layers/DropOutLayer.cs +++ b/src/ConvNetSharp/Layers/DropOutLayer.cs @@ -43,7 +43,7 @@ public override Volume Forward(Volume input, bool isTraining = false) // scale the activations during prediction for (var i = 0; i < length; i++) { - output.Weights[i] *= this.DropProb.Value; + output.Weights[i] *= 1 - this.DropProb.Value; } }