From 23cb35e6c8eae8b59fab161036ae3f417a55c8db Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Fri, 30 Mar 2018 11:46:51 +0000
Subject: [PATCH] Changed small_object

---
 src/activation_kernels.cu |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/activation_kernels.cu b/src/activation_kernels.cu
index 5d61529..d5f25a0 100644
--- a/src/activation_kernels.cu
+++ b/src/activation_kernels.cu
@@ -31,7 +31,7 @@
 __device__ float loggy_activate_kernel(float x){return 2./(1. + exp(-x)) - 1;}
 __device__ float relu_activate_kernel(float x){return x*(x>0);}
 __device__ float elu_activate_kernel(float x){return (x >= 0)*x + (x < 0)*(exp(x)-1);}
-__device__ float relie_activate_kernel(float x){return x*(x>0);}
+__device__ float relie_activate_kernel(float x){return (x>0) ? x : .01*x;}
 __device__ float ramp_activate_kernel(float x){return x*(x>0)+.1*x;}
 __device__ float leaky_activate_kernel(float x){return (x>0) ? x : .1*x;}
 __device__ float tanh_activate_kernel(float x){return (2/(1 + exp(-2*x)) - 1);}
@@ -154,7 +154,7 @@
 
 extern "C" void activate_array_ongpu(float *x, int n, ACTIVATION a) 
 {
-    activate_array_kernel<<<cuda_gridsize(n), BLOCK>>>(x, n, a);
+    activate_array_kernel<<<cuda_gridsize(n), BLOCK, 0, get_cuda_stream()>>>(x, n, a);
     check_error(cudaPeekAtLastError());
 }
 

--
Gitblit v1.10.0