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

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

 채택된 답변

MathWorks Support Team
MathWorks Support Team 2015년 9월 18일

0 개 추천

ニューラルネットワークでオンライン学習をしてネットワークを逐次更新するには、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
このコードの前半では入力重みとバイアスの学習係数を設定していないために、バッチ学習となっています。後半で学習係数を設定してオンライン学習になっています。

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

제품

릴리스

R2013a

태그

Community Treasure Hunt

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

Start Hunting!