fann_train_on_data

(PECL fann >= 1.0.0)

fann_train_on_data在整個數據集上訓練一段時間。

說明

fann_train_on_data(
    resource $ann,
    resource $data,
    int $max_epochs,
    int $epochs_between_reports,
    float $desired_error
): bool

在整個數據集上訓練一段時間。

該訓練使用 fann_set_training_algorithm() 函數選擇的算法和這些訓練算法設置的參數。

參數

ann

神經網絡 資源。

data

神經網絡訓練數據 資源。

max_epochs

訓練應該繼續(xù)的最大周期數。

epochs_between_reports

用戶函數之間的周期數。當為0時表示沒有用戶函數被調用。

desired_error

期望的是 fann_get_MSE()fann_get_bit_fail()的返回值, 取決于 fann_set_train_stop_function() 選擇的停止函數。

返回值

成功時返回 true,其它情況下返回 false。

參見