IZEL_set_learning_rate
学習率を指定します。
int IZEL_set_learning_rage(int handle, double rate)
引数
引数名 | I/O | 説明 |
---|---|---|
handle | In | ハンドラ値 |
rate | In | 学習率を指定します。学習率のデフォルト値は0.01です。 |
戻り値
0 : 正常
-1: エラー
サンプルソース
#include <Izel.mqh>
void sample()
{
int handle;
// オープン
handle = IZEL_open();
if( handle < 0 ) {
// エラー処理;
}
// 学習モデルの定義
IZEL_add_layer(handle, 100);
IZEL_add_layer(handle, 200);
IZEL_set_output_layer(handle, 2);
// トレーニングデータのセット
IZEL_open_x_train(handle);
IZEL_append_x_train(handle, 1.0);
IZEL_append_x_train(handle, 2.0);
IZEL_close_x_train(handle);
IZEL_set_y_train(handle, 1);
IZEL_set_learning_rate(handle, 0.001);
/*
データのセットを繰り返す。
・
・
・
*/
// トレーニング
IZEL_fit(handle, 100, 32);
// クローズ
IZEL_close(handle);
}