0

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.

Community
  • 1
  • 1
ARSN
  • 167
  • 1
  • 10
  • I think it is better to understand your question if you provide your code too. – Alexander Korovin Sep 11 '16 at 21:59
  • @Alexander, I use the same code as in the linked Matlab tutorial. I only change it to use my data. [link](http://www.mathworks.com/help/nnet/ug/construct-deep-network-using-autoencoders.html) – ARSN Sep 11 '16 at 22:22

1 Answers1

1

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.

Alexander Korovin
  • 1,639
  • 1
  • 12
  • 19