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

padding constructor #4

Open
yuqi98 opened this issue Jun 25, 2019 · 2 comments
Open

padding constructor #4

yuqi98 opened this issue Jun 25, 2019 · 2 comments

Comments

@yuqi98
Copy link

yuqi98 commented Jun 25, 2019

Hi! I'm trying to use MiniDNN to build CNN under C++. It seems there's no padding constructor in the configuration of convolutional layer. I was wondering if I want to add that feature, what do you recommand to do?

@yixuan
Copy link
Owner

yixuan commented Jun 28, 2019

Unfortunately MiniDNN has not yet implemented padding types other than the "valid" rule. It is indeed some tedious work to write such low-level functions, and probably you should take a look at the tiny-dnn library, which supports different padding rules according to the documentation.

@Asheeshkrsharma
Copy link
Collaborator

Hi @yuqi98, Although it is not supported in MiniDNN, it can surely be done using the Eigen matrix library which it uses under the hood. A quick google search gave following ways:

https://stackoverflow.com/questions/53182368/extend-pad-matrix-in-eigen

Mind that the techniques are not optimal as a copy operation is needed. Instead I would recommend using conservativeResize as it directly manipulates the pointers of the underlying array base class. All you will need after that would be to filling the desired pad values (if not zero) using block ops.

Do let me know if you are planning to do that, we can may be collaborate.

Asheesh

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

3 participants