Skip to content

Conversation

@kentang-mit
Copy link
Collaborator

In this PR we implement the generalized sparse convolution operation. This operation mainly differs from the current sparse convolution in downsampling stage with kernel_size not equal to stride. The output will be dilated (similar to strided nn.Conv3d) and is not calculated with c_out = torch.floor(c_in // 2) * 2. Besides, we also added support for asymmetric convolutional kernel sizes and strides.

Copy link
Collaborator

@clee-ai clee-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! I will take a closer look more this week and test it.

I was wondering, will this make cpp functions like convert_map_forward and insertion_forward obsolete? Unless maybe somebody is using torchsparse.nn.functional.voxelize outside of torchsparse.nn.functional.downsample for some reason? We might want to see if we can remove these

Copy link
Contributor

@zhijian-liu zhijian-liu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! It looks good to me overall.

clee-ai
clee-ai previously approved these changes Jun 14, 2021
Copy link
Collaborator

@clee-ai clee-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me! And it's much cleaner than the code on master which is great.

I haven't tested the code but I assume you checked it on different stride/kernel configs and it worked as expected?

zhijian-liu
zhijian-liu previously approved these changes Jun 19, 2021
Copy link
Contributor

@zhijian-liu zhijian-liu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

zhijian-liu
zhijian-liu previously approved these changes Jun 21, 2021
@zhijian-liu zhijian-liu merged commit 313c9b0 into master Jun 21, 2021
@zhijian-liu zhijian-liu deleted the dev/generalized_sparseconv branch June 24, 2021 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants