From 1b94df24fde6dea36d85b1ea7873a83e1a213277 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Thu, 17 Jul 2014 16:05:07 +0000
Subject: [PATCH] Midway through lots of fixes, checkpoint

---
 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