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

How does num_deformable_groups work? #5

Closed
victorhcm opened this issue Oct 10, 2017 · 6 comments
Closed

How does num_deformable_groups work? #5

victorhcm opened this issue Oct 10, 2017 · 6 comments

Comments

@victorhcm
Copy link

First off, thank you for your amazing port, @1zb!

How does num_deformable_groups work? I was wondering if it is splitting the offsets, thus each group of input channels will have a given set of offsets (which may be different from other groups). For instance, if we have an input of 6 channels (1, 6, H, W), and num_deformable_groups=2, then we would have our input split between two tensors of (1, 3, H, W) and (1, 3, H, W), each with its respective instance of offset mask (1, 3, kH, kW). Is that correct?

@1zb
Copy link
Owner

1zb commented Oct 11, 2017

Yes. You are right.

inC must be divisible by num_deformable_groups. Then each group has their own offset.

@victorhcm
Copy link
Author

victorhcm commented Oct 11, 2017

Thank you for your attention! 😊

@victorhcm
Copy link
Author

Sorry for bothering you again with this, @1zb, I have a follow up question. In the mxnet repository, the authors provide two options, num_group and num_deformable_group. According to their definition, num_group splits the input data, while num_deformable_group splits the output tensor and applies the i-th offset group to the i-th output group.

Thus, here in this repository, is num_deformable_group actually equivalent to num_group in the original implementation, as it is splitting the input data instead of output?

@1zb
Copy link
Owner

1zb commented Oct 12, 2017

Thanks for your response.

According to these lines and these lines, the parameter num_deformable_group splits the input tensor along channel axis, which contradicts the definition. I will take a look at the code again.

The parameter num_group or groups exists in vanilla CNN. You might find useful discussions here.

@victorhcm
Copy link
Author

I think you're right, it does seem to be splitting the input tensor. I should check their model to see how they are being used, to make sure.

Thank you for the num_group links, by the way!

@victorhcm
Copy link
Author

I was checking their code, it seems they really got the definitions reversed. In this line, they divide the number of output channels by the number of groups, while here they convolve the i-th output with the i-th weight.

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