From b32a287e38f4c6a41828f18b4669dec9f3af4943 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Thu, 17 Jul 2014 17:17:52 +0000
Subject: [PATCH] Merge branch 'master' of pjreddie.com:jnet
---
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