Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory optimization in ZeroPadding, Cropping layer. #51

Open
Alan-Turing-Ko opened this issue Jun 20, 2019 · 1 comment
Open

Memory optimization in ZeroPadding, Cropping layer. #51

Alan-Turing-Ko opened this issue Jun 20, 2019 · 1 comment

Comments

@Alan-Turing-Ko
Copy link

Alan-Turing-Ko commented Jun 20, 2019

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.

@majianjia
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants