Prev: Macro excel
Next: fminunc optimization
From: Missam None on 10 Apr 2010 13:18 Hi Each time,I train my network ,the training stops becaue "Minimum Gradient reached" knowing that :inputs=4*4000 targets=14*4000, Is it be possible to answer these questions: 1-Does this have anything to do with the inputs or targets size? 2-Does it have a relation with the way of initialising the network?if yes,please show me the right way to do it. Thank you in advance. Here is the code: numHiddenNeurons = 7; net = newpr(inputs,targets,numHiddenNeurons,{},'trainscg'); net.divideParam.trainRatio =60/100; net.divideParam.valRatio = 20/100; net.divideParam.testRatio =20/100; net.trainParam.goal=0.01; net.trainParam.mem_reduc=2; net.initFcn='initlay'; net.layers{1}.initFcn='initwb'; net.layers{2}.initFcn='initwb'; net.inputWeights{1,1}.initFcn='rands'; net.layerWeights{1,2}.initFcn='rands'; net.biases{1}.initFcn='rands'; net.biases{2}.initFcn='rands'; net = init(net); net.trainParam.min_grad=1e-30; net.layers{1}.transferFcn='tansig'; net.layers{2}.transferFcn='hardlims'; % Train and Apply Network [net,tr] = train(net,inputs,targets);
From: Missam None on 10 Apr 2010 17:17 Could anyone help??
|
Pages: 1 Prev: Macro excel Next: fminunc optimization |