From 70d622ea54c55aa5489e71b769a92447a586c879 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Mon, 14 Jul 2014 05:07:51 +0000
Subject: [PATCH] Added batch to col2im, padding option
---
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