函式名:fann_set_cascade_max_cand_epochs()
函式描述:設定級聯訓練的最大候選週期數。
適用版本:FANN >= 2.1.0
用法: bool fann_set_cascade_max_cand_epochs(resource $ann, int $cascade_max_cand_epochs)
引數:
- $ann:神經網路資源物件
- $cascade_max_cand_epochs:級聯訓練的最大候選週期數
返回值:
- 成功時返回 true,失敗時返回 false
示例:
// 建立一個神經網路物件
$ann = fann_create_standard(3, 2, 3, 1);
// 設定級聯訓練的最大候選週期數為 100
fann_set_cascade_max_cand_epochs($ann, 100);
// 其他操作...
// 銷燬神經網路物件
fann_destroy($ann);
說明: fann_set_cascade_max_cand_epochs() 函式用於設定級聯訓練過程中的最大候選週期數。級聯訓練是一種用於訓練神經網路的技術,它透過逐步增加神經元的複雜度來提高網路的效能。候選週期數表示在每個級別中每個候選神經元的訓練週期數。
在示例中,我們首先建立一個標準的三層神經網路物件。然後,使用 fann_set_cascade_max_cand_epochs() 函式將級聯訓練的最大候選週期數設定為 100。最後,我們可以進行其他操作,如訓練網路或使用網路進行預測。最後,透過呼叫 fann_destroy() 函式銷燬神經網路物件。