Train one iteration with a set of inputs, and a set of desired outputs

- « fann_test_data

- fann_train_epoch »

- PHP Manual
- Fann Functions
- Train one iteration with a set of inputs, and a set of desired outputs

# fann_train

(PECL fann >= 1.0.0)

fann_train — Train one iteration with a set of inputs, and a set of desired outputs

### Description

fann_train(resource `$ann`, array `$input`, array `$desired_output`): bool

Train one iteration with a set of inputs, and a set of desired outputs. This training is always incremental training, since only one pattern is presented.

### Parameters

`ann`

  Neural network resource.

`input`

  An array of inputs. This array must be exactly fann_get_num_input() long.

`desired_output`

  An array of desired outputs. This array must be exactly fann_get_num_output() long.

### Return Values

Returns `true` on success, or `false` otherwise.

### See Also

- fann_train_on_data() - Trains on an entire dataset for a period of time
- fann_train_epoch() - Train one epoch with a set of training data
- fann_get_num_input() - Get the number of input neurons
- fann_get_num_output() - Get the number of output neurons