projects
/
platform
/
upstream
/
caffeonacl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06167a2
)
caffe relu layer update, not sure if it's useful or not
author
Yangqing Jia
<jiayq84@gmail.com>
Mon, 14 Oct 2013 17:49:29 +0000
(10:49 -0700)
committer
Yangqing Jia
<jiayq84@gmail.com>
Mon, 14 Oct 2013 17:49:29 +0000
(10:49 -0700)
src/caffe/layers/relu_layer.cu
patch
|
blob
|
history
diff --git
a/src/caffe/layers/relu_layer.cu
b/src/caffe/layers/relu_layer.cu
index
8613b3b
..
b0fc46e
100644
(file)
--- a/
src/caffe/layers/relu_layer.cu
+++ b/
src/caffe/layers/relu_layer.cu
@@
-39,7
+39,7
@@
template <typename Dtype>
__global__ void ReLUForward(const int n, const Dtype* in, Dtype* out) {
int index = threadIdx.x + blockIdx.x * blockDim.x;
if (index < n) {
- out[index] =
max(in[index], Dtype(0.))
;
+ out[index] =
in[index] > 0 ? in[index] : 0
;
}
}