Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<fann_trainfann_train_on_data>
^Fann FunctionsLast updated: Mon, 26 Oct 2026

fann_train_epoch

(PECL fann >= 1.0.0)

fann_train_epoch — Train one epoch with a set of training data

Description

function fann_train_epoch(resource $ann, resource $data): float

Train one epoch with the training data stored in data. One epoch is where all of the training data is considered exactly once.

This function returns the MSE error as it is calculated either before or during the actual training. This is not the actual MSE after the training epoch, but since calculating this would require going through the entire training set once more, it is more than adequate to use this value during training.

The training algorithm used by this function is chosen by fann_set_training_algorithm() function.

Parameters

ann

Neural network resource.

data

Neural network training data resource.

Return Values

The MSE, or false on error.

See Also


<fann_trainfann_train_on_data>
^Fann FunctionsLast updated: Mon, 26 Oct 2026