sigmoid fix (cpp) #3411

Merged
merged 1 commit into from Apr 14, 2017
Jump to file or symbol
Failed to load files and symbols.
+1 −1
Split
@@ -7,7 +7,7 @@ namespace caffe {
template <typename Dtype>
inline Dtype sigmoid(Dtype x) {
- return 1. / (1. + exp(-x));
+ return 0.5 * tanh(0.5 * x) + 0.5;
}
template <typename Dtype>