[libfann] 36/242: added a trick to the derived function, to avoid getting stuck

Christian Kastner chrisk-guest at moszumanska.debian.org
Sat Oct 4 21:10:17 UTC 2014


This is an automated email from the git hooks/post-receive script.

chrisk-guest pushed a commit to tag Version2_0_0
in repository libfann.

commit f941064d2c00cc33125b7fe14d2161aaa356bf79
Author: Steffen Nissen <lukesky at diku.dk>
Date:   Sat Jan 10 01:29:49 2004 +0000

    added a trick to the derived function, to avoid getting stuck
---
 src/include/fann_internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/include/fann_internal.h b/src/include/fann_internal.h
index 76cefe8..a53c58f 100644
--- a/src/include/fann_internal.h
+++ b/src/include/fann_internal.h
@@ -74,7 +74,7 @@ void fann_update_stepwise_output(struct fann *ann);
 #define fann_div(x,y) (x/y)
 #define fann_random_weight() (fann_rand(-0.1,0.1))
 #define fann_sigmoid(steepness, value) (1.0/(1.0 + exp(-2.0 * steepness * value)))
-#define fann_sigmoid_derive(steepness, value) (2.0 * steepness * value * (1.0 - value))
+#define fann_sigmoid_derive(steepness, value) ((2.0 * steepness * value * (1.0 - value)) + 0.10) /* the plus is to avoid flat spots */
 
 #endif
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libfann.git



More information about the debian-science-commits mailing list