fann_set_callback
PHP function
Edit on GitHub ✎
(PECL fann >= 1.0.0)
Sets the callback function for use during training
Description
fann_set_callback(resource $ann, callable $callback): bool
Sets the callback function for use during training. It means that it is called from fann_train_on_data() or fann_train_on_file().
Parameters
annDescription
callbackThe supplied callback function takes following parameters:
ann- The neural networkresourcetrain- The train dataresourceor null if called fromfann_train_on_file()max_epochs- The maximum number of epochs the training should continueepochs_between_reports- The number of epochs between calling this functiondesired_error- The desiredfann_get_MSE()orfann_get_bit_fail(), depending on the stop function chosen byfann_set_train_stop_function()epochs- The current epoch
The callback should return true. If it returns false, the training will terminate.