I have another question about running narx with bigg data. I tried increase the hidden size, to get better model.
seems like 300 is some upper limit for the hidden units allowed- memory error. So for 1000 it clearly says no.
with the narxnet of :
net = narxnet(1:25,1:25,1000);
I get this error .e file
{Error using zeros
Requested 1000x54373200 (405.1GB) array exceeds maximum array size preference
(377.4GB). This might cause MATLAB to become unresponsive.
Error in nnet.internal.configure.inputWeight (line 25)
net.IW{i,j} = zeros(newSize);
Error in nnet.internal.configure.input (line 42)
net = nnet.internal.configure.inputWeight(net,j,i,x);
Error in network/configure (line 244)
net = nnet.internal.configure.input(net,i,X{i});
Error in preparets (line 302)
net = configure(net,'input',xx(i,:),i);
}
with the size 600 i get - out of memeory error, How to fix it to able to use the NARX for big data:
net = narxnet(1:25,1:25,600);
we get the following
{Out of memory.
Error in normr (line 27)
xi(~isfinite(xi)) = 0;
Error in randnr>new_value_from_rows_cols (line 152)
x = normr(rands(rows,cols));
Error in randnr (line 98)
out1 = new_value_from_rows_cols(in1,in2);
Error in initnw>calcnw (line 287)
wDir = randnr(s,r);
Error in initnw>initialize_layer (line 212)
[w,b] = calcnw(range,net.layers{i}.size,active);
Error in initnw (line 101)
out1 = initialize_layer(in1,in2);
Error in initlay>initialize_network (line 155)
net = feval(initFcn,net,i);
Error in initlay (line 97)
out1 = initialize_network(in1);
Error in network/init (line 31)
net = feval(initFcn,net);
Error in network/configure (line 253)
net = init(net);
Error in preparets (line 302)
net = configure(net,'input',xx(i,:),i);
}
Also, the matlab code do not scale up with more cpu count . Like I get same time for 24 cpu and 120 cpu.
Related
I want to train an Artificial Neural Network on matlab r2020a for an automatic voltage regulator, I already have a simulink file for my output, but whenever I want to run this code:
I = out.input';
T = out.output';
net=newff(minmax(I),[3,5,1],{'logsig','tansig','purelin'},'trainlm');
net = init(net); % Used to initialize the network (weight and biases)
net.trainParam.show =1; % The result of error (mse) is shown at each iteration (epoch)
net.trainParam.epochs = 10000; % Maximum limit of the network training iteration process (epoch)
net.trainParam.goal =1e-12; % Stopping criterion based on error (mse) goal
net=train(net,I,T); % Start training the network
I keep facing this error:
Unrecognized function or variable 'procInfo'.
Error in nnMex.netHints (line 143)
processingInfoArray = [processingInfoArray procInfo];
Error in nncalc.setup1>setupImpl (line 201)
calcHints = calcMode.netHints(net,calcHints);
Error in nncalc.setup1 (line 16)
[calcMode,calcNet,calcData,calcHints,net,resourceText] = setupImpl(calcMode,net,data);
Error in nncalc.setup (line 7)
[calcMode,calcNet,calcData,calcHints,net,resourceText] = nncalc.setup1(calcMode,net,data);
Error in network/train (line 361)
[calcLib,calcNet,net,resourceText] = nncalc.setup(calcMode,net,data);
Error in ann (line 8)
net=train(net,I,T); % Start training the network
I'm not sure where to start to my search for this problem, but I think it might be a compiler issue
I tried searching online, but all I got was just suggestion to download compilers and toolboxes.
I have a matrix M of size(262322x4). On running knn imputation:
M=csvread("C:\Users\Hello\Desktop\DATA\B.csv",1,0);
B = transpose(M);
A = knnimpute(B,1);
C=transpose(A);
I get the following error:
>>knn_imputation
Error using pdistmex
Out of memory. Type HELP MEMORY for your options.
Error in pdist (line 264)
Y = pdistmex(X',dist,additionalArg);
Error in knnimpute (line 162)
distances = pdist(dataNoNans',metric,distargs{:});
Error in knn_imputation (line 4)
A = (knnimpute(B,1));
Is this error due to Memory limitations or something else?
(Note: Memory size: 8GB)
I have a 10^5 square sparse matrix called pbAttack. Each element represents if there is connection between node i and node j. If there is connection, pbAttack(i,j) = 1. Otherwise, pbAttack (i,j) = 0. Then I want to use it following this tutorial: Matlab Autoencoders. I use the same code as in the linked Matlab tutorial. I only change it to use my data.
However, I got following errors:
Error using bsxfun
Out of memory. Type HELP MEMORY for your options.
Error in mapminmax.apply (line 8)
y = bsxfun(#plus,y,settings.ymin);
Error in mapminmax.create (line 44)
y = mapminmax.apply(x,settings);
Error in mapminmax (line 51)
[y,settings] = mapminmax.create(x,param);
Error in nnet.internal.configure.input (line 31)
[x,config] = feval(processFcns{j},x,processParams{j});
Error in network/configure (line 234)
net = nnet.internal.configure.input(net,i,X{i});
Error in nntraining.config (line 116)
net = configure(network(net),X,T);
Error in nntraining.setup>setupPerWorker (line 68)
[net,X,Xi,Ai,T,EW,Q,TS,err] = nntraining.config(net,X,Xi,Ai,T,EW,configNetEnable);
Error in nntraining.setup (line 43)
[net,data,tr,err] = setupPerWorker(net,trainFcn,X,Xi,Ai,T,EW,enableConfigure);
Error in network/train (line 335)
[net,data,tr,err] = nntraining.setup(net,net.trainFcn,X,Xi,Ai,T,EW,enableConfigure,isComposite);
Error in Autoencoder.train (line 490)
net = train(net,X,X,'useGPU',iYesOrNo(useGPU));
Error in trainAutoencoder (line 105)
autoenc = Autoencoder.train(X, autonet, paramsStruct.UseGPU);
Error in workflow_autoencoder (line 8)
autoenc1 = trainAutoencoder(pbAttack,hiddenSize,...
Are all these errors caused by the huge size of the matrix? Is there a work around so that it does not need so much memory? Thank you so much.
It just means that you don't have enough memory for this (since your matrix is not so sparse). You can try to repeat your code by reducing the size of the matrix.
I have variable (type table) in matlab:
and I'm using fitcnb for training naive bayes. I execute code:
Mdl = fitcnb(data,'class')
But I get an error :
Error using classreg.learning.FullClassificationRegressionModel.prepareDataCR (line 129) X must be a numeric matrix.
Error in classreg.learning.classif.FullClassificationModel.prepareData (line 455) [X,Y,W,dataSummary] = ...
Error in classreg.learning.FitTemplate/fit (line 205 [X,Y,dataPrepOut{1:this.NDataPrepOut}] = ...
Error in ClassificationNaiveBayes.fit (line 127) this = fit(temp,X,Y);
Error in fitcnb (line 219) this = ClassificationNaiveBayes.fit(X,Y,varargin{:});
fitcnb call's syntax is correct
Mdl = fitcnb(tbl,ResponseVarName)
But why I get an error ?
I am trying to get familiar with the Image category classification using deep learning. I am trying to run the Matlab example available on
http://uk.mathworks.com/help/vision/examples/image-category-classification-using-deep-learning.html
However running this example is giving me the following error
Error using message/getString
Unable to load a message catalog 'nnet_cnn:layer:Layer'. Please check
the file location and format.
Error in nnet.cnn.layer.Layer/getVectorHeader (line 113)
header = getString( message( ...
Error in nnet.cnn.layer.Layer/displayNonScalarObject (line 86)
header = sprintf( ' %s\n', getVectorHeader( layers )
);
Error in cnn (line 150)
convnet.Layers
Moreover if I pass and ignore this error, I will get the following error later for the line
trainingFeatures = activations(convnet, trainingSet, featureLayer, ...
'MiniBatchSize', 32, 'OutputAs', 'columns')
Undefined variable "nnet" or class "nnet.internal.cnngpu.convolveForward2D".
Error in nnet.internal.cnn.layer.Convolution2D/doForward (line 218)
Z = nnet.internal.cnngpu.convolveForward2D( ...
Error in nnet.internal.cnn.layer.Convolution2D/forwardNormal (line 195)
Z = this.doForward(X,this.Weights.Value,this.Bias.Value);
Error in nnet.internal.cnn.layer.Convolution2D/forward (line 98)
[Z, memory] = this.forwardNormal( X );
Error in nnet.internal.cnn.SeriesNetwork/activations (line 50)
output = this.Layers{currentLayer}.forward( output );
Error in SeriesNetwork/activations (line 269)
YChannelFormat = predictNetwork.activations(X, layerID);
Error in cnn (line 262)
trainingFeatures = activations(convnet, trainingSet, featureLayer, ...
Can please someone tell me the possibilities for getting this error and how to solve it.
Regards