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

About separable 4d convolution #18

Closed
shim94kr opened this issue Jul 30, 2020 · 4 comments
Closed

About separable 4d convolution #18

shim94kr opened this issue Jul 30, 2020 · 4 comments

Comments

@shim94kr
Copy link

Hello, thank you for introducing nice work and code!

I have a question about separable 4d convolution.

Is the WTA operation explicitly applied to the 4d separable convolution? In the code, I can't see the part of WTA in the conv4d.py.
or is the WTA kernel in sec3.2 the same as the other kernel(e.g., spatial kernel)?

Plus, can you explain (or derive) more in details about the way to decompose 4d convolution into the wta and spatial convolution (sec3.2, [4d-convolution -> factorization]? Actually, it was hard to understand how the original 4d convolution be equal to the factorized one by equation.

It would be very appreciated if these questions are answered. Thank you!

@gengshan-y
Copy link
Owner

Hi, there is no explicit WTA operation in the separable 4D convolution. The 2D convolutions along the (u,v) displacement dimension was referred to as "WTA convolution", which can be specialized to a WTA kernel by learning from data.

The 4D kernel is assumed to be separable (rank-2), and therefore equivalent to the convolution of two 2D kernels. To test how much this assumption holds, there is an experiments in Tab.4 (Full-4D vs Sep-4D).

Let me know if more explanations are needed.

@shim94kr
Copy link
Author

Thanks for your quick reply. I still want to clarify whether you denote the kernels having the same form and implementation differently as "spatial" and "wta" kernels.

And can you explain why the separable kernels should be rank-2? Is the rank used for tensor not the matrix?

Thank you!

@gengshan-y
Copy link
Owner

gengshan-y commented Jul 30, 2020

The WTA and sptial conv are implemented here:

def forward(self,x):

The self.conv2 is the WTA conv and the self.conv1 is the spatial conv.

Yes, it's the rank for the 4D tensor. Say if you want a 2D kernel to be separable, its rank has to be one.

@shim94kr
Copy link
Author

Though the notion of the rank for the tensor is hard to understand, conceptually I understand what you mean.
Thank you so much! I close this issue.

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