NN Out of memory trough code but not trough GUI, R2010a.

1 view (last 30 days)
Hello, I'm using neural network to try to fit some data, here is the data used:
if true
% code
XB_all_bottles_norm_corr07 3585x2015 57790200 double
XB_temp 2015x10 161200 double
precio 1x3585 28680 double
precio_temp 1x10 80 double
end
I attempted to train using the ?temp variables which are a subset of the complete data base, with the precio variable being the dependent function. I used the GUI that pops up with nftool, with no satisfactory results, so I tried to add a hidden layer, generating a script from the GUI. The problem is that in every attempt, I get a memory error, despite the fact that I'm using a very small set (GUI calculate successfully with 100 hundred data or so, the script method crash with only 10 data). *I'm using Matlab 2010a, theres a problem with this distribution.? *There is a method to add a hidden layer trough the GUI. *Another idea where the error came from?
Here is the code for reference:
if true
% code
function net = create_fit_net(inputs,targets)
%CREATE_FIT_NET Creates and trains a fitting neural network.
%
% NET = CREATE_FIT_NET(INPUTS,TARGETS) takes these arguments:
% INPUTS - RxQ matrix of Q R-element input samples
% TARGETS - SxQ matrix of Q S-element associated target samples
% arranged as columns, and returns these results:
% NET - The trained neural network
%
% For example, to solve the Simple Fit dataset problem with this function:
%
% load simplefit_dataset
% net = create_fit_net(simplefitInputs,simplefitTargets);
% simplefitOutputs = sim(net,simplefitInputs);
%
% To reproduce the results you obtained in NFTOOL:
%
% net = create_fit_net(XB_temp,precio_temp);
% Create Network numHiddenNeurons = 35; % Adjust as desired net = newfit(inputs,targets,numHiddenNeurons); net.divideParam.trainRatio = 70/100; % Adjust as desired net.divideParam.valRatio = 15/100; % Adjust as desired net.divideParam.testRati-o = 15/100; % Adjust as desired
% Train and Apply Network [net,tr] = train(net,inputs,targets); outputs = sim(net,inputs);
% Plot plotperf(tr) plotfit(net,inputs,targets) plotregression(targets,outputs) end I had not added the second hidden layer, because the code crash with only one, at this point seems difficult to me to think that the problem is the number of data points used. Please Help. Thanks in advance.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!