[libfann] 05/242: minor fixes

Christian Kastner chrisk-guest at moszumanska.debian.org
Sat Oct 4 21:10:12 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 df84634414b35bc2802f0cc5dc942ee3d4bec0df
Author: Steffen Nissen <lukesky at diku.dk>
Date:   Mon Nov 3 23:16:11 2003 +0000

    minor fixes
---
 src/Makefile                |  4 +++-
 src/fann.c                  | 18 +++++++++---------
 src/include/fann_internal.h |  4 ++--
 3 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index b91a0c4..57d90ca 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -48,6 +48,8 @@ ARM_FILES = $(ARM_FIXED_O_FILES) $(ARM_FLOAT_O_FILES) $(ARM_DOUBLE_O_FILES) \
 	    test/performance_arm test/performance_fixed_arm
 #	    $(patsubst %_jneural.cc, %_jneural_arm, $(JNEURAL_CC_FILES)) \
 
+ARM_LIBRARIES = libarmfixedfann.a libarmfloatfann.a libarmdoublefann.a
+
 all: $(LIBRARIES)
 
 arm: $(ARM_FILES)
@@ -173,4 +175,4 @@ runtest: test
 	./test/xor_test_fixed
 
 clean:
-	rm -rf $(TEST_RUN_FILES) $(ARM_FILES) $(O_FILES) $(LIBRARIES) *~ test/*~ include/*~ test/*.net test/*fixed*data test/*float*data
+	rm -rf $(TEST_RUN_FILES) $(ARM_FILES) $(O_FILES) $(LIBRARIES) $(ARM_LIBRARIES) *~ test/*~ include/*~ test/*.net test/*fixed*data test/*float*data
diff --git a/src/fann.c b/src/fann.c
index f3fda55..c2ab53d 100644
--- a/src/fann.c
+++ b/src/fann.c
@@ -286,16 +286,14 @@ struct fann * fann_create_from_file(const char *configuration_file)
 	}
 
 	ann = fann_allocate_structure(learning_rate, num_layers);
+	ann->connection_rate = connection_rate;
+	
 #ifdef FIXEDFANN
 	ann->decimal_point = decimal_point;
 	ann->multiplier = multiplier;
-	ann->activation_function_hidden = activation_function_hidden;
-	ann->activation_function_output = activation_function_output;
-	ann->activation_hidden_steepness = activation_hidden_steepness;
-	ann->activation_output_steepness = activation_output_steepness;
-	ann->connection_rate = connection_rate;
 
-	/* Calculate the parameters for the stepwise linear sigmoid function fixed point.
+	/* Calculate the parameters for the stepwise linear
+	   sigmoid function fixed point.
 	   Using a rewritten sigmoid function.
 	   results 0.005, 0.05, 0.25, 0.75, 0.95, 0.995
 	 */
@@ -305,11 +303,13 @@ struct fann * fann_create_from_file(const char *configuration_file)
 	ann->activation_results[3] = multiplier - (fann_type)(multiplier/4.0+0.5);
 	ann->activation_results[4] = multiplier - (fann_type)(multiplier/20.0+0.5);
 	ann->activation_results[5] = multiplier - (fann_type)(multiplier/200.0+0.5);
+#endif
 
 	fann_set_activation_hidden_steepness(ann, activation_hidden_steepness);
 	fann_set_activation_output_steepness(ann, activation_output_steepness);
-#endif
-
+	fann_set_activation_hidden(ann, activation_function_hidden);
+	fann_set_activation_output(ann, activation_function_output);
+	
 #ifdef DEBUG
 	printf("creating network with learning rate %f\n", learning_rate);
 	printf("input\n");
@@ -429,7 +429,7 @@ void fann_set_activation_output_steepness(struct fann *ann, fann_type steepness)
 #ifdef FIXEDFANN
 	int i;
 #endif
-	ann->activation_hidden_steepness = steepness;
+	ann->activation_output_steepness = steepness;
 #ifdef FIXEDFANN
 	for(i = 0; i < 6; i++){
 		ann->activation_output_values[i] = (fann_type)((((log(ann->multiplier/(float)ann->activation_results[i] -1)*(float)ann->multiplier) / -2.0)*(float)ann->multiplier) / steepness);
diff --git a/src/include/fann_internal.h b/src/include/fann_internal.h
index b647b6f..f4d248a 100644
--- a/src/include/fann_internal.h
+++ b/src/include/fann_internal.h
@@ -25,8 +25,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #include <math.h>
 #include "fann_data.h"
 
-#define FANN_FIX_VERSION "FANN_FIX_0.1"
-#define FANN_FLO_VERSION "FANN_FLO_0.1"
+#define FANN_FIX_VERSION "FANN_FIX_1.0"
+#define FANN_FLO_VERSION "FANN_FLO_1.0"
 
 #ifdef FIXEDFANN
 #define FANN_VERSION FANN_FIX_VERSION

-- 
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