Что я делаю не так?
Постоянно вылетает 504 ошибка (Gateway Time-out).
ini_set('max_execution_time', 900);
$num_input = 39;
$num_output = 1;
$num_layers = 3;
$num_neurons_hidden = 128;
$desired_error = 0.001;
$max_epochs = 100000;
$epochs_between_reports = 1000;
$ann = fann_create_standard($num_layers, $num_input, $num_neurons_hidden, $num_output);
if ($ann) {
fann_set_activation_function_hidden($ann, FANN_SIGMOID_SYMMETRIC);
fann_set_activation_function_output($ann, FANN_SIGMOID_SYMMETRIC);
$filename = dirname(__FILE__) . "/data.data";
if (fann_train_on_file($ann, $filename, $max_epochs, $epochs_between_reports, $desired_error))
fann_save($ann, dirname(__FILE__) . "/data.net");
fann_destroy($ann);
}
exit();
Файл data.data:
20 39 1
13771 22675 3720 2 0 3 0 1.01 25 25 1.416 1.925 2.816 1.4 -1 1.1 1 1 0 0 0 0 0 0 0 4 3 2 3 33 33 21 18 -1 -1 45 55 3 0
1
2854 1994 3602 2 1 2 2 2.86 2.55 3.34 1.264 1.464 2.1 1.82 1.37 1.24 4 1 0 1 0 0 0 1 1 5 4 1 5 59 65 41 47 10 1 47 53 2 3
1
499347 23679 3629 1 0 1 1 3.7 2.11 3.08 1.495 2.24 3.32 1.3 1.08 1.06 1 2 1 0 0 0 0 0 2 1 4 1 1 55 49 27 31 -1 -1 56 44 2 1
-1
421559 371623 3685 2 0 3 0 -1 -1 -1 1.36 1.83 2.816 1.4 1.14 1.1 5 3 1 3 0 0 0 0 1 7 1 3 1 66 62 35 35 -1 -1 0 0 3 0
1
4676 808701 3699 0 0 1 0 1.14 7.2 18 1.36 1.83 2.816 1.4 1.16 1.1 4 3 0 2 0 0 0 0 0 1 2 3 4 38 32 24 20 -1 -1 59 41 3 0
-1
1796011 46873 3648 0 1 0 1 10 4.2 1.37 1.495 2.288 3.32 1.3 -1 1.06 2 2 0 0 0 0 0 0 0 0 4 6 3 50 47 38 27 -1 -1 52 48 0 2
1
378999 31097 3634 0 0 0 0 3.66 2.04 3.26 1.504 2.34 3.42 1.288 -1 1.06 4 5 0 1 0 0 0 0 0 1 0 6 2 35 61 44 46 -1 -1 39 61 0 2
1
3848 130689 3652 0 1 0 1 15 4.44 1.33 1.73 2.835 4.14 1.24 1.06 1.04 1 1 2 2 0 0 0 1 0 0 1 0 0 81 74 46 42 -1 -1 50 50 0 2
1
1759155 220521 3653 0 2 0 3 27 23 1.01 1.45 2.01 2.97 1.365 -1 1.08 3 7 0 0 0 0 0 0 0 2 6 2 7 41 44 15 27 -1 -1 45 55 1 4
-1
448941 2560 3632 1 0 3 0 1.01 21 65 1.45 2.005 2.955 1.4 1.13 1.09 4 6 2 0 0 0 0 1 0 3 0 3 2 65 47 41 40 -1 -1 51 49 3 0
1