I cannot get to an stable neural network :/
Mostrar comentarios más antiguos
i have written a code it is about training a neural network , no matter what i do its training performance is not stable , i know that there is always some differences between training performances in each run but in my case the results are so much different, some times my network experiences overfitting some times it experiences underfitting sometimes its training error is fair enough, it is getting really frustrating i don't know what to do!!!!i have changed my traing functions to see if i can get better performance, for each of them i had to change my network structure too but at the end , i again faced with the same problem
if true
net=feedforwardnet(100);
net.trainFcn='traingdm';
net.divideParam.trainRatio=1 net.divideParam.valRatio=0 net.divideParam.testRatio=0
net.trainparam.epochs=1000; [net,tr]=train(net,xl,TL); Y=net(xl);
end
there is a specific reason for putting net.divideParam.trainRatio=1
Respuesta aceptada
Más respuestas (1)
Greg Heath
el 12 de Dic. de 2014
H = 10 % default value used explicitly
net = fitnet( H ); % For regression
net.divideFcn = 'dividetrain'; % 1/0/0 division
rng( 'default' ) % In order to duplicate results later
[ net, tr ] = train( net, x, t);
y = net( x );
R2 = 1 - mse(t-y)/var(t,1) % Desire R2 >= 0.99
For many, many examples search the NEWSGROUP using
greg fitnet Ntrials
If you are still a glutton for punishment, search in ANSWERS
Hope this helps
Thank you for formally accepting my answer
Greg
Categorías
Más información sobre Deep Learning Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!