fann_set_bit_fail_limit() 未能实际设置位失败限制,迫使我手动编辑 ANN 文件

fann_set_bit_fail_limit() fails to actually set the bit fail limit, forcing me to manually edit the ANN file

struct fann *ann;
ann = fann_create_standard(3, 600, 1200, 30);
fann_set_activation_function_hidden(ann, FANN_SIGMOID);
fann_set_activation_function_output(ann, FANN_SIGMOID);
fann_set_bit_fail_limit(ann, 0.002);
fann_save(ann, "ann.net");

每当我从文件中加载这个神经网络并读取 fann_get_bit_fail_limit() 时,返回值是默认的 0.35 而不是我尝试设置的 0.002。我必须手动编辑 ANN 文件才能生效。

我正在使用 doublefann.h。我做错了什么吗?

"Am I doing something wrong?"

根据 Documentation - FANN Training > Parameters > fann_get_bit_fail_limit(强调):

The bit fail limit is used during training where the fann_stopfunc_enum is set to FANN_STOPFUNC_BIT.

示例:

fann_set_train_stop_function(ann, FANN_STOPFUNC_BIT);
fann_set_bit_fail_limit(ann, 0.002);
fann_save(ann, "ann.net");

以防万一:

I am using doublefann.h.

Link -ldoublefann 而不是 -lfann.