From b1d8ce6e28e0f1e48f3d4deb9859f8168189cb1b Mon Sep 17 00:00:00 2001 From: zard99 Date: Thu, 14 Jun 2018 11:31:53 +0200 Subject: [PATCH] Missing "return true" at the end of the ann_callback. According to the documentation (http://php.net/manual/en/function.fann-set-callback.php), the return value should be specified. Furthermore, if no return value is specified, the callback will be called only once, and not the number specified in $epochs_between_reports (personally tested). --- tests/fann_set_callback_basic.phpt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/fann_set_callback_basic.phpt b/tests/fann_set_callback_basic.phpt index 465b2b4..b544c43 100644 --- a/tests/fann_set_callback_basic.phpt +++ b/tests/fann_set_callback_basic.phpt @@ -10,6 +10,7 @@ function ann_callback( $ann, $train_data, $max_epochs, $epochs_between_reports, var_dump($epochs_between_reports); var_dump($desired_error); var_dump($epochs); + return true; } $num_input = 2;