Hi All, I am trying to build a FF NN with delay between layers to reproduce an abstract. My aim is to build the following 3 layers NN 1x5x1 with 5 delays taps between layers (5:5). So far this is the code I used to programmed but I'm not sure my code is building the network I want. Can anybody help me to check if my design is correct? if not, any correction I may need to do?
d1=(0:5);
d2=(0:5);
dtdnn_net=distdelaynet({d1,d2},5);
[p,Pi,Ai,t]=preparets(dtdnn_net,y2,y2);
dtdnn_net.trainFcn='trainbr';
dtdnn_net.trainParam.epochs=1000;
dtdnn_net.trainParam.lr=0.01;
dtdnn_net.layers{2}.size=1;
dtdnn_net=train(dtdnn_net,p,t);
yp=sim(dtdnn_net,p);
Thank you

댓글 수: 1

Greg Heath
Greg Heath 2014년 8월 31일
편집: Greg Heath 2014년 8월 31일
Why did you post this without testing it on the data indicated in
help distdelaynet
?
Why didn't you use
view(net)
as indicated in the help and doc documentation?
doc distdelaynet
Why didn't you calculate the resulting resubstitution error?

댓글을 달려면 로그인하십시오.

 채택된 답변

Greg Heath
Greg Heath 2014년 9월 22일

1 개 추천

[P,T] = simpleseries_dataset;
d1=(0:5);
d2=(0:5);
dtdnn_net = distdelaynet({d1,d2},5);
[Ps,Pi,Ai,Ts] = preparets(dtdnn_net,P,T);
ts = cell2mat(Ts);
MSE00s = var(ts',1) % 0.042348
dtdnn_net.trainFcn = 'trainbr';
dtdnn_net.trainParam.epochs = 1000;
dtdnn_net.trainParam.lr = 0.01;
dtdnn_net.layers{2}.size = 1;
rng('default')
[dtdnn_net tr Ys Es Xf Af] = train(dtdnn_net,Ps,Ts,Pi,Ai);
view(dtdnn_net)
%Ys = sim(dtdnn_net,Ps,Pi,Ai);
%Es = gsubtract(dtdnn_net,Ts,Ys)
es = cell2mat(Es);
R2s = 1-mse(es)/MSE00s % 0.9996
NOTE: Using net defaults with trainlm decreases learning time by a factor of 20

추가 답변 (0개)

카테고리

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

질문:

2014년 8월 30일

답변:

2014년 9월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by