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 ExchangeDeep 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