Wednesday, September 02, 2015

libfann bugs

Looking for a general purpose neural network library, fann seemed reasonable.  Jury's still out, but I see a number of shortcomings:


  • I see people warning against using its builtin input/output scaling.  So make sure your training set (inputs and outputs) is all scaled to [0,1]

  • fann_create_train(...) shows up in the docs but doesn't appear to actually exist (version 2.1.0)

  • I see no examples of fann_create_train_from_callback(), and the docs are unclear, but it looks like it allocates the memory itself and then calls the callback num_data times.  So the num_data value that gets passed to the callback is 1..n, and the two pointers point directly to the elements to be filled in.
  • #include <doublefann.h> with gcc -lfann caused data corruption for me, because the internal library calls had fann_type = float while my main program had fann_type = double.  So either use #include <fann.h> with gcc -lfann  or  #include <doublefann.h> with gcc -ldoublefann!

1 comment:

fxshvwoq3e said...
This comment has been removed by a blog administrator.