ニューラルネットワー​クを適応的に学習する​にはどうすればよいで​すか?

ニューラルネットワークを適応的に学習する方法を教えて下さい。

 Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 18 Sep. 2015

0 Stimmen

ニューラルネットワークでオンライン学習をしてネットワークを逐次更新するには、ADAPT 関数 (適応学習) を使用します。
 
% ネットワークの入力
P = {[1;2] [2;1] [2;3] [3;1]};
% ネットワークのターゲット(教師パタン)
T = {4 5 7 7};
%%ネットワークの詳細設定
net = linearlayer(0,0);
net = configure(net,P,T);
net.IW{1,1} = [0 0];
net.b{1} = 0;
% バッチ学習
% a: ネットワークの出力
% e: ネットワークのエラー(ターゲット - 出力)
[net,a,e,pf] = adapt(net,P,T)% a: 0 0 0 0
[net,a,e,pf] = adapt(net,P,T)% a: 0 0 0 0
%%学習係数を変更
net.inputWeights{1,1}.learnParam.lr = 0.1;
net.biases{1,1}.learnParam.lr = 0.1;
% オンライン学習
[net,a,e,pf] = adapt(net,P,T)% a: 0 2 6 5.8
[net,a,e,pf] = adapt(net,P,T)% a: 5.520 4.800 7.392 5.976
このコードの前半では入力重みとバイアスの学習係数を設定していないために、バッチ学習となっています。後半で学習係数を設定してオンライン学習になっています。

Weitere Antworten (0)

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2013a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!