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

nn_decomposer does not support kernel_h and kernel_w #14

Open
hahne opened this issue Nov 9, 2017 · 3 comments
Open

nn_decomposer does not support kernel_h and kernel_w #14

hahne opened this issue Nov 9, 2017 · 3 comments

Comments

@hahne
Copy link

hahne commented Nov 9, 2017

nn_decomposer.py expects cur_layer_param.convolution_param.kernel_size._values to be set. This means the convolutional kernel needs to be square and kernel_h and kernel_w may not be different. Is there any special reason for this?

@wenwei202
Copy link
Owner

@hahne There is no constraint on the kernel size from the algorithm perspective. It works in general (see here).

The code expects those, only because I did a lazy job to escape from a cumbersome code block of if-else-if-else to check that the kernel_size exists in kernel_size or kernel_h kernel_w . If it exists in kernel_size, we also had to check it was a list or a scalar to make it work in general.

@hahne
Copy link
Author

hahne commented Nov 9, 2017

@wenwei202 ok understand. Thank you for the info!

@wenwei202
Copy link
Owner

@hahne I suspect those assert is not necessary for linear combination layer, but we need to delete kernel_h and kernel_w if they are copied from decomposed conv layer. Similar thing for stride, pad and dilation.

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