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.cl | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/activations.cl b/src/activations.cl
index 19428b1..6ab135a 100644
--- a/src/activations.cl
+++ b/src/activations.cl
@@ -2,6 +2,12 @@
SIGMOID, RELU, LINEAR, RAMP, TANH
}ACTIVATION;
+float linear_activate(float x){return x;}
+float sigmoid_activate(float x){return 1./(1. + exp(-x));}
+float relu_activate(float x){return x*(x>0);}
+float ramp_activate(float x){return x*(x>0)+.1*x;}
+float tanh_activate(float x){return (exp(2*x)-1)/(exp(2*x)+1);}
+
float activate(float x, ACTIVATION a, float dropout)
{
//if((float)rand()/RAND_MAX < dropout) return 0;
--
Gitblit v1.10.0