[libfann] 232/242: fixed python setup.py + examples learn rate

Christian Kastner chrisk-guest at moszumanska.debian.org
Sat Oct 4 21:10:49 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 9be51a3a1858c20e61a56a3408ba6e43d915f9db
Author: Vincenzo Di Massa <hawk at hawk.linuxpratico.net>
Date:   Mon Dec 19 00:02:40 2005 +0000

    fixed python setup.py + examples learn rate
---
 python/examples/mushroom.py     | 2 ++
 python/examples/simple_train.py | 1 +
 python/setup.py                 | 2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/python/examples/mushroom.py b/python/examples/mushroom.py
index c8c347d..7dfb400 100755
--- a/python/examples/mushroom.py
+++ b/python/examples/mushroom.py
@@ -19,6 +19,8 @@ iterations_between_reports = 1
 print "Creating network."	
 train_data = fann.read_train_from_file(os.path.join("..","..","benchmarks","datasets","mushroom.train"))
 ann = fann.create(connection_rate, (train_data.get_num_input(), num_neurons_hidden, train_data.get_num_output()))
+ann.set_learning_rate(learning_rate)
+
 
 # start training the network
 print "Training network"
diff --git a/python/examples/simple_train.py b/python/examples/simple_train.py
index 10e224b..925446a 100755
--- a/python/examples/simple_train.py
+++ b/python/examples/simple_train.py
@@ -12,6 +12,7 @@ max_iterations = 100000
 iterations_between_reports = 1000
 
 ann = fann.create(connection_rate, (num_input, num_neurons_hidden, num_output))
+ann.set_learning_rate(learning_rate)
 ann.set_activation_function_output(fann.SIGMOID_SYMMETRIC_STEPWISE)
 
 ann.train_on_file("../../examples/xor.data", max_iterations, iterations_between_reports, desired_error)
diff --git a/python/setup.py b/python/setup.py
index 0eb3090..e2c83db 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -40,6 +40,6 @@ setup(
     url='http://sourceforge.net/projects/fann/',
     license='GNU LESSER GENERAL PUBLIC LICENSE (LGPL)',
     py_modules=['pyfann.libfann','pyfann.fann'],
-    ext_modules=[Extension('pyfann._libfann',['pyfann/pyfann.i','pyfann/fann_helper.c'], include_dirs=['../src/include'], extra_objects=hunt_files('../src','fann*.o') )]
+    ext_modules=[Extension('pyfann._libfann',['pyfann/pyfann.i','pyfann/fann_helper.c'], include_dirs=['../src/include'], extra_objects=['../src/doublefann.o']) ]
 )
 

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