Arturo Servin
2009-02-07 13:03:27 UTC
Hello,
I am trying to use FANN with Python. So far it looks it works,
however when testing I have something weird. I want to get each input
from training file and evaluate using the generated network to obtain
the output. I have something like:
test_data =
fann
.read_train_from_file
(os.path.join("nets","tnn_base_test_traffic_in.txt"))
#test_data =
fann
.read_train_from_file
(os.path.join("nets","tnn_base_test_traffic_in.txt"))
for i in range(test_data.get_num_data()):
print "Inputs: ",
for input in test_data.get_input(i):
print"%f, " % input,
print "\n"
The display values on screen coming from the input file does not match
the real input file (nn_base_test_traffic_in.txt). So I do not know if
I am doing something wrong or simply I am not using python correctly
to display the values from the file.
Thanks
-as
I am trying to use FANN with Python. So far it looks it works,
however when testing I have something weird. I want to get each input
from training file and evaluate using the generated network to obtain
the output. I have something like:
test_data =
fann
.read_train_from_file
(os.path.join("nets","tnn_base_test_traffic_in.txt"))
#test_data =
fann
.read_train_from_file
(os.path.join("nets","tnn_base_test_traffic_in.txt"))
for i in range(test_data.get_num_data()):
print "Inputs: ",
for input in test_data.get_input(i):
print"%f, " % input,
print "\n"
The display values on screen coming from the input file does not match
the real input file (nn_base_test_traffic_in.txt). So I do not know if
I am doing something wrong or simply I am not using python correctly
to display the values from the file.
Thanks
-as