CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

Large / medium network.. Out of memory

Open asim33 opened this issue 9 years ago • 4 comments

I have 500k feature dim. And l want to use 02 layers with 20k neurons each. And its multi class classification. When ever i try to run with more than 10k neurons in any layer. I get gpu 0 or 1 out of memory. I am using 3 gtx 1070. And 1 bit sgd. 1.7 ver. Is it possible to work out max network size which would fit in my gpu. Or general rule of thumb.

asim33 avatar Dec 13 '16 17:12 asim33

Have you tried reducing your minibatch size or turning on shareNodeValueMatrices or hyperCompressMemory?

cha-zhang avatar Dec 13 '16 18:12 cha-zhang

If I choose the entire batch of 100 samples or 100k. Its still same.error. Same for mini batch. Share node matrices or memory compression i will try this. However i am trying to figure out the limit of features X weight matrix. for a given gpu available memory. Ofcourse each extra layer is also counting.
Is it possible to distribute neural network structure. Please advise as i am new to machine learning stuff.

asim33 avatar Dec 13 '16 19:12 asim33

We don't support model parallelism at this moment.

Your first layer would be 500k x 20k, that's over 10billion parameters. That's too big for your GPU card. Are you sure you need so many parameters? Would you consider reducing the input feature dim by, say, PCA?

cha-zhang avatar Dec 13 '16 20:12 cha-zhang

Many thanks. Then I will turn to pca or something statistically similar.

asim33 avatar Dec 13 '16 20:12 asim33