- updating the code with :
ann := fann_create_standard(3, 2, 2, 1); // 3 2 3 1
...
fann_save(ann, '..\..\result\xor_float.net'); // after fann_train_on_data
I have three strange things :
- The result :
Max epochs 500000. Desired error: 0.0010000000.
Epochs 1. Current error: 0.3613613844. Bit fail 4.
Epochs 10. Current error: 0.2489670813. Bit fail 4.
Epochs 20. Current error: 0.1703140140. Bit fail 4.
Epochs 30. Current error: 0.0926765800. Bit fail 4.
Epochs 40. Current error: 0.0035322148. Bit fail 4.
Epochs 50. Current error: 0.0009799493. Bit fail 4.
Epochs 60. Current error: 0.0000480996. Bit fail 4.
Epochs 69. Current error: 0.0000001738. Bit fail 0.
0,00 Xor 0,00 = 0,00
0,00 Xor 1,00 = 1,00
1,00 Xor 0,00 = 1,00
1,00 Xor 1,00 = 0,00
If the desired_error is 0.001 why the software didn't stop around 50 epochs with current error = 0.0009 ?
- Sometimes, the software finds the solution with around 80 epochs,
or after around 1500 epochs, or doesn't find it (more than 500000) ???
Here is an example, where the software doesn't find.
FANN_FLO_2.1
num_layers=3
learning_rate=0.700000
connection_rate=1.000000
network_type=0
learning_momentum=0.000000
training_algorithm=2
train_error_function=1
train_stop_function=1
cascade_output_change_fraction=0.010000
quickprop_decay=-0.000100
quickprop_mu=1.750000
rprop_increase_factor=1.200000
rprop_decrease_factor=0.500000
rprop_delta_min=0.000000
rprop_delta_max=50.000000
rprop_delta_zero=0.100000
cascade_output_stagnation_epochs=12
cascade_candidate_change_fraction=0.010000
cascade_candidate_stagnation_epochs=12
cascade_max_out_epochs=150
cascade_min_out_epochs=50
cascade_max_cand_epochs=150
cascade_min_cand_epochs=50
cascade_num_candidate_groups=2
bit_fail_limit=1.00000004749745130000e-003
cascade_candidate_limit=1.00000000000000000000e+003
cascade_weight_multiplier=4.00000005960464480000e-001
cascade_activation_functions_count=10
cascade_activation_functions=3 5 7 8 10 11 14 15 16 17
cascade_activation_steepnesses_count=4
cascade_activation_steepnesses=2.50000000000000000000e-001 5.00000000000000000000e-001 7.50000000000000000000e-001 1.00000000000000000000e+000
layer_sizes=3 3 2
scale_included=0
neurons (num_inputs, activation_function, activation_steepness)=(0, 0, 0.00000000000000000000e+000) (0, 0, 0.00000000000000000000e+000) (0, 0, 0.00000000000000000000e+000) (3, 3, 5.00000000000000000000e-001) (3, 3, 5.00000000000000000000e-001) (0, 3, 5.00000000000000000000e-001) (3, 3, 5.00000000000000000000e-001) (0, 3, 5.00000000000000000000e-001)
connections (connected_to_neuron, weight)=(0, 3.92322349548339840000e+000) (1, 3.92322349548339840000e+000) (2, -7.84493064880371090000e+000) (0, -1.50000000000000000000e+003) (1, -1.50000000000000000000e+003) (2, -7.62409162521362300000e+000) (3, -6.58075952529907230000e+000) (4, -1.50000000000000000000e+003) (5, 8.37309539318084720000e-001)
- the fann_save function returns :
layer_sizes = 3 2 2 and not 2 1 1 ???
FANN_FLO_2.1
num_layers=3
learning_rate=0.700000
connection_rate=1.000000
network_type=0
learning_momentum=0.000000
training_algorithm=2
train_error_function=1
train_stop_function=1
cascade_output_change_fraction=0.010000
quickprop_decay=-0.000100
quickprop_mu=1.750000
rprop_increase_factor=1.200000
rprop_decrease_factor=0.500000
rprop_delta_min=0.000000
rprop_delta_max=50.000000
rprop_delta_zero=0.100000
cascade_output_stagnation_epochs=12
cascade_candidate_change_fraction=0.010000
cascade_candidate_stagnation_epochs=12
cascade_max_out_epochs=150
cascade_min_out_epochs=50
cascade_max_cand_epochs=150
cascade_min_cand_epochs=50
cascade_num_candidate_groups=2
bit_fail_limit=1.00000004749745130000e-003
cascade_candidate_limit=1.00000000000000000000e+003
cascade_weight_multiplier=4.00000005960464480000e-001
cascade_activation_functions_count=10
cascade_activation_functions=3 5 7 8 10 11 14 15 16 17
cascade_activation_steepnesses_count=4
cascade_activation_steepnesses=2.50000000000000000000e-001 5.00000000000000000000e-001 7.50000000000000000000e-001 1.00000000000000000000e+000
layer_sizes=3 3 2
scale_included=0
neurons (num_inputs, activation_function, activation_steepness)=(0, 0, 0.00000000000000000000e+000) (0, 0, 0.00000000000000000000e+000) (0, 0, 0.00000000000000000000e+000) (3, 3, 5.00000000000000000000e-001) (3, 3, 5.00000000000000000000e-001) (0, 3, 5.00000000000000000000e-001) (3, 3, 5.00000000000000000000e-001) (0, 3, 5.00000000000000000000e-001)
connections (connected_to_neuron, weight)=(0, -2.48201004028320310000e+002) (1, 2.06313705444335940000e+001) (2, -5.79473733901977540000e+000) (0, 9.12133026123046870000e+000) (1, -8.40330982208251950000e+000) (2, -7.53969717025756840000e+000) (3, 1.51012849807739260000e+001) (4, 2.90742225646972660000e+001) (5, -7.53958272933959960000e+000)
Thanks for your help.