From 076009ebe308fde0156304e701f36e8bb04e4d6b Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Thu, 17 Jul 2014 17:14:59 +0000
Subject: [PATCH] Fixed batch stuff in conv layer

---
 src/activations.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/activations.c b/src/activations.c
index 4674a02..3b11716 100644
--- a/src/activations.c
+++ b/src/activations.c
@@ -43,7 +43,7 @@
 
 float activate(float x, ACTIVATION a, float dropout)
 {
-    if((float)rand()/RAND_MAX < dropout) return 0;
+    if(dropout && (float)rand()/RAND_MAX < dropout) return 0;
     switch(a){
         case LINEAR:
             return linear_activate(x)/(1-dropout);

--
Gitblit v1.10.0