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 to] 3D Convs with batch size = 1, Inverse 3D Convs with batch size = N #711

Open
simo23 opened this issue Jul 18, 2024 · 0 comments
Open

Comments

@simo23
Copy link

simo23 commented Jul 18, 2024

Hi,

I have a script that does:

  1. Feature extraction of a pointcloud using an spconv-based UNet
  2. Downsamples the features using a series of 3D convolutions
  3. Converts the spconv tensor into a torch tensor
  4. Replicates the tensor N times (simulating batch size = N)
  5. Updates the N-replicated tensor with other torch modules
  6. Converts the N-replicated tensor into spconv tensor
  7. Upsamples the updated N-replicated tensor to original resolution with a series of inverse convolutions (inverse of step 2)

I have the same indices in step 2 and 7, the difference is that in step 7 they are replicated N times. Now spconv throws an error and does not allow to do this in a naive way. I also tried to replicate the internal ImplicitGemmIndiceData used by the convolution without luck, by replicating the indices and setting the proper batch idx.

A workaround is to do a for loop over the N elements but its not optimal. Is there a nice way to do it?

Thank you

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

1 participant