我一直在试验FANN库。输入在每行上以785个整数的形式,其中第一个整数是正确的标签,其余784个整数描绘数字表示的28个交叉28矩阵中的相应像素的强度。这是被训练以识别数字的神经网络的配置(如训练代码中所述):
const unsigned int num_input = 784;
const unsigned int num_output = 10;
const unsigned int num_layers = 3;
const unsigned int num_neurons_hidden = 20;
const float desired_error = (const float) 0.0;
const unsigned int max_epochs = 1000;
const unsigned int epochs_between_reports = 2;
ann = fann_create_standard(num_layers, num_input, num_neurons_hidden, num_output);
data = fann_read_train_from_file("trainparse.csv");
fann_set_activation_steepness_hidden(ann, 1);
fann_set_activation_steepness_output(ann, 1);
fann_set_activation_function_hidden(ann, FANN_SIGMOID_SYMMETRIC);
fann_set_activation_function_output(ann, FANN_SIGMOID_SYMMETRIC);
fann_set_train_stop_function(ann, FANN_STOPFUNC_BIT);
fann_set_bit_fail_limit(ann, 0.05f);
fann_set_training_algorithm(ann, FANN_TRAIN_RPROP);
完整的培训代码为here。在数据集上训练神经网络后,我计算了网络为这个特定数据集本身做出的正确估计的百分比。我得到的价值 81.16%。考虑到神经网络使用反向传播算法进行学习会被认为是算法表现良好,平庸还是糟糕?