Register    Login    Forum    Search    FAQ

Board index » FANN » Bugs




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Bug? Not sure. Issue with Python bindings / FANN
 Post Posted: Sun Nov 23, 2008 2:56 am 
Offline

Joined: Sat Oct 25, 2008 7:42 pm
Posts: 7
Hi. Working on trying to use FANN with the Python bindings. I'm still early stage in my learning, but am trying to make things work. Found some examples for the Python binding at Sourceforge and am working through it line-by-line.

Link: http://fann.cvs.sourceforge.net/viewvc/ ... iew=markup

From the example linked above:
Code:
   12 train_data = libfann.training_data()
   13 train_data.read_train_from_file("../../benchmarks/datasets/two-spiral.train")


Line 13 crashed Python. All code windows close and even the Python Shell (I'm using IDLE) closes completely.

Basically I've isolated it to the read_train_from_file command. I can create ANNs, etc.. but this is posing an issue.

Is this the right place for such conversation, and if so, could someone help me? Alternately, point me in the right direction.

Using the latest FANN and also Python 2.5.2 in Ubuntu.

TIA.


Top 
 Profile  
 
 Post subject:
 Post Posted: Tue Nov 25, 2008 6:41 am 
Offline

Joined: Tue Nov 25, 2008 6:18 am
Posts: 3
Same problem here, with gentoo, python 2.5.2 and glibc 2.6.1; I use the same function

Code:
print "fetching training and test data"
traindata = libfann.training_data()
if debug: print "debug initialized"
traindata.read_train_from_file(trainfilename)
if debug: print "debug read"
testdata = libfann.training_data()
if debug: print "debug test initialized"
testdata.read_train_from_file(testfilename)
if debug: print "debug test read"


And the result is this error on a login console (real terminal)
Code:
fetching training and test data
debug initialized
FANN Error 11: Unable to allocate memory.
*** glibc detected *** /usr/bin/python: double free or corruption (out): x0805a0d8 ***


And a different error on a non-login console (terminal emulator in X)

Code:
fetching training and test data
debug initialized
FANN Error 11: Unable to allocate memory.
debug read
debug test initialized
FANN Error 11: Unable to allocate memory.
debug test read


I can't understand why the behavior is different between login and non-login console, (in a login one the script hangs up) and most of all I can't understand the reason of such an error


Top 
 Profile  
 
 Post subject:
 Post Posted: Thu Nov 27, 2008 3:03 pm 
Offline

Joined: Tue Nov 25, 2008 6:18 am
Posts: 3
I fixed my problem, it was not a bug; I simply forgot the first line in training and data files, the line with number of training pairs, input neurons and output neurons. I found the error after switching from 2.1 to 2.0 and finding the same behavior; i figured that a library still in development could not handle well a malformed data structure. Thanks anyway.


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 3 posts ] 

Board index » FANN » Bugs


Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: