How can I design my own fitting neural network?

I want to design a neural network which will be trained to calculate the squra root of 1000 random numbers generated. but I don't want to use fitnet, instead I want to design my own fitting network. can any one tell me the architecture of fitnet used in matlab means how many layers, initializing functions, training functions etc used.

 채택된 답변

Greg Heath
Greg Heath 2013년 12월 1일

0 개 추천

Always start with the default configuration.
help fitnet
Combine with the script obtained via the nntool GUI.
You also can find examples by searching
greg fitnet Ntrials
HTH
Thank you for formally accepting my answer.
Greg

댓글 수: 1

saima zia
saima zia 2013년 12월 2일
편집: saima zia 2013년 12월 2일
Thanks for guiding. I m sending u my code, I have tried to create my own fitnet to train it to calculate square root of number,instead of using the matlab fitnet. the structure of my network is exactly like the fitnet architecture( I analyzed the fitnet architecture by looking at the script and object created of fitnet).plz check it and let me know what mistake I m making cause its not getting trained.
x=rand(1,1000)*150;
t=sqrt(x);
net=network();
net.adaptFcn='adaptwb';
net.numInputs=1;
net.inputs{1}.size=1;
net.numLayers=2;
net.layers{1}.size=10;
net.layers{2}.size=1;
net.inputConnect(1,1)=1;
net.layerConnect(2,1)=1;
net.biasConnect(1)=1;
net.biasConnect(2)=1;
net.biases{1}.learnFcn='learngdm';
net.biases{1}.initFcn='';
net.biases{2}.learnFcn='learngdm';
net.biases{2}.initFcn='';
net.outputConnect(2)=1;
net.layers{1}.transferFcn='tansig';
net.layers{2}.transferFcn = 'purelin';
net.inputweights{1,1}.initFcn='';
net.inputweights{1,1}.learnFcn='learngdm';
net.layerweights{2,1}.initFcn='';
net.layerweights{2,1}.learnFcn='learngdm';
net.inputs{1}.processFcns = {'removeconstantrows','mapminmax'};
net.outputs{2}.processFcns = {'removeconstantrows','mapminmax'};
net.divideFcn = 'dividerand'; % Divide data randomly
net.divideMode = 'sample'; % Divide up every sample
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
net.trainFcn = 'trainlm';
net.performFcn = 'mse';
net.plotFcns = {'plotperform','plottrainstate','ploterrhist', ... 'plotregression', 'plotfit'};
[net,tr] = train(net,x,t);
outputs = net(x);
test=100;
result = sim(net,test);

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

추가 답변 (0개)

카테고리

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

질문:

2013년 11월 20일

편집:

2013년 12월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by