declare net of neural network in matlab
3 次查看(过去 30 天)
显示 更早的评论
hi, I'd assigned this variable in matlab net = newff(minmax(input),Target,Hiddenlayer,'logsig','logsig'},'traingdx');'
I have 5 testing different images and 20 training images(4 sample for each of images). my question is to set the input and target, the matrix must be in dimension/matrix values or just simply in vector values? in my research, the problem is nnet does not gives accurate result. the performance always keep on changing when I run nnet.Why is that.. and can someone described me does the neural network values not fixed. is it changes every time we run the nnet?thanks in advance!
0 个评论
采纳的回答
Greg Heath
2012-10-12
% declare net of neural network in matlab
% Asked by Tulips on 10 Oct 2012 at 10:49
% hi, I'd assigned this variable in matlab
% net = newff(minmax(input),Target,Hiddenlayer,'logsig','logsig'},'traingdx');'
Invalid syntax for BOTH OBSOLETE versions of newff.
Which version are you using?
Is this regression or classification?
If the latter, use columns of eye(5) for target columns.
Make sure inputs are standardized (zscore or mapstd) and use tansig as the hidden node activation function.
[ I N ] = size(input)
[O N ] = size(target)
net = newff(mimax(input), [H O],{'tansig' 'logsig'); % Obsolete
net = newff(input, target, H, {'tansig' 'logsig'} ) ;% Less Obsolete
% I have 5 testing different images and 20 training images(4 sample for % each of images). my question is to set the input and target, the matrix % must be in dimension/matrix values or just simply in vector values? in my % research, the problem is nnet does not gives accurate result. the % performance always keep on changing when I run nnet.Why is that.. and can % someone described me does the neural network values not fixed. is it % changes every time we run the nnet?thanks in advance!
Each call of newff loads random weights. To repeat a previous run reinitialize the RNG to the same initial state.
Sample code is available by searhing the newsgroup using some subset of
heath newff close clear Neq Nw Ntrials
Hope this helps.
Thank you for formally accepting my answer.
Greg
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!