nnom icon indicating copy to clipboard operation
nnom copied to clipboard

Memory optimization in ZeroPadding, Cropping layer.

Open Alan-Turing-Ko opened this issue 5 years ago • 1 comments

Hi majianjia. With your kind support of ZeroPadding layer, I deployed my caffe model successfully. Now I am trying to deploy my model on memory constraint chip, and I found ZeroPadding layer consume much memory.

#3 Conv2D - ReLU - ( 64, 64, 8) 819k (17,424,32,768, 100) 1 1 1 - - - - - #4 ZeroPad - - ( 65, 65, 8) (32,768,33,800, 0) 1 - 1 - - - - -

I think ZeroPadding and Cropping can be replaced as Single Buffer layer, not sure though. I expect a quick response as before. Thanks again for your great work.

Alan-Turing-Ko avatar Jun 20 '19 01:06 Alan-Turing-Ko

Hi @Alan-Turing-Ko, Thanks for your suggestion, the current method is to keep them simple and efficient. I think it is possible to make them single buffer layers. Cropping is straight forward, but zero padding need to be done in reverse order. I am planning to do it in the following days. If you cant wait, you can also make your version and pull request are always welcome. Jianjia

majianjia avatar Jun 20 '19 11:06 majianjia