fann_set_callback
(PECL fann >= 1.0.0)
fann_set_callback — 设置训练期间使用的回调函数。
说明
fann_set_callback(resource
$ann
, collable $callback
): bool设置训练期间使用的回调函数。 这意味着它被fann_train_on_data() 或 fann_train_on_file()调用。
参数
-
ann
-
神经网络 资源。
-
callback
-
提供的回调函数接受以下参数:
ann
- 神经网络 resourcetrain
- 训练数据 resource 或者 当被 fann_train_on_file() 为null
max_epochs
- 训练将进行的最大周期数。epochs_between_reports
- 在调用该函数之前训练进行的最大周期数。desired_error
- 期望的 fann_get_MSE() 或者 fann_get_bit_fail(), 取决于fann_set_train_stop_function()函数选择的停止函数。epochs
- The current epoch
回调将会返回
true
. 如果返回false
, 表明训练将会终止。
返回值
成功时返回 true
,其它情况下返回 false
。

User Contributed Notes
There are no user contributed notes for this page.
备份地址:http://www.lvesu.com/blog/php/function.fann-set-callback.php