How do I improve the performance in training neural network ?
1 view (last 30 days)
Show older comments
Im currently working on MATLAB project especially in neural network training. Im currently working on collecting samples from evaluated nuclear data files (Energy and total cross section). My project is to get the new value of energy after it trained with neural network and compare it with energy from samples but with the same total cross section. Here is my source code
E1 =transpose (E);
B =transpose (A);
net = newff(B,E1,[70 70 70 70],{'logsig','logsig','tansig','logsig'});
net = train(net,B,E1);
Ereg = sim(net,B);
net.trainParam.goal = 0.0000000000000001;
net.trainParam.epochs=1000;
net.trainParam.min_grad = 0;
E is the energy and A is the total cross section from samples. Each of them consist of 40306 elements. I used transpose function because I kept getting error "Matrix Dimension Must Agree' when I trained the samples and somehow changing the array help me to solve the problem. My question is after I trained it using trainlm the performance is not so good. The error is so high that I tried to chenge the input and transfer function for each layer but it didnt work so well. How I can increase the performance or is there something wrong with my code? Thanks.
0 Comments
Accepted Answer
Greg Heath
on 26 Feb 2014
Try this. Details can be discussed later
[ I N ] = size(B) % = ?
{ O N ] = size(E1) % = ?
MSE00 = mean(var(E1'),1) % Reference MSE = ?
net = newff(B,E1,H);% vary H in [ 1, -1 + ceil( (N*O-O) / (I+O+1) ) ]
[ net tr Ereg err ]= train(net,B,E1); % err = E1-Ereg
NMSE = mse(err)/MSE00 % Good values are below 0.01
0 Comments
More Answers (0)
See Also
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!