Discussion:
Odd Bug
Steffen Nissen
2007-03-10 17:30:06 UTC
Permalink
Well, the error seems to indicate that desired_output points to some
uninitialized memory, so there is either a problem with the trainData, or a
problem with the code that executes it. It does however also indicate that
the stack is corrupt, this is not so good, but it could be a side effect of
another problem.

Try inspecting the trainData structure before executing and/or try to go one
or two levels up when you get the error (up command in gdb). As a last
effort you could try stepping through the code to find out why this happens.
I do however recommend using an GUI interface to gdb when stepping, I like
KDeveloper myself.

Another problem which sometimes occur to people using the library is
incompatibility between the fann_type used in the code and the fann_type in
the linked library, this always gives the oddest problems.

Please let me know what you find out.

Steffen
I've encountered an odd bug while I was trying to train from a file. I'm
having a segfault inside of fann_compute_MSE() when I'm running
fann_train_on_data().
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x06d68000
fann_compute_MSE (ann=0x300350, desired_output=0x6d68000) at
fann_train.c:259
259 neuron_diff = *desired_output - neuron_value;
(gdb) bt
#0 fann_compute_MSE (ann=0x300350, desired_output=0x6d68000) at
fann_train.c:259
#1 0x002164ec in fann_compute_MSE (ann=0x300350,
desired_output=0x6d68000) at fann_train.c:273
Previous frame identical to this frame (corrupt stack?)
(gdb) print *desired_output
Cannot access memory at address 0x6d68000
(gdb) print neuron_value
$1 = 3.68934881e+19
(gdb) print desired_output
$2 = (fann_type *) 0x6d68000
(gdb)
trainData = fann_read_train_from_file();
ann = fann_create_standard(3,14,3,1);
fann_set_training_algorithm(ann, FANN_TRAIN_RPROP);
fann_set_activation_function_hidden(ann, FANN_SIGMOID_SYMMETRIC);
fann_set_activation_function_output(ann, FANN_SIGMOID_SYMMETRIC);
fann_set_bit_fail_limit(ann, 0.5);
fann_init_weights(ann, trainData);
fann_train_on_data(ann, trainData, 1000, 500, 0.0000001);
Ideas? I'm running the latest from CVS, but this problem also occurred
with v2.1beta. I have 1267698 examples in the training file. I can send
you the training file if that would be useful.
~Seth
--
Steffen Nissen - http://MySpace.com/SteffenNissen
Project Administrator - Fast Artificial Neural Network Library (fann)
http://fann.sf.net
Loading...