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

shuffle makes no sense #7

Closed
zhixiongzh opened this issue Apr 16, 2021 · 1 comment
Closed

shuffle makes no sense #7

zhixiongzh opened this issue Apr 16, 2021 · 1 comment

Comments

@zhixiongzh
Copy link

Hi,
in the file function voxelize_spconv, which is in model_zoom.py, you shuffle all points by
cat_pt_ind = cat_pt_ind[shuffled_ind,:]

and then the output unq and processed_pooled_data is still in the order of the grid, which is done automatically by scatter_max function.
pooled_data = torch_scatter.scatter_max(processed_cat_pt_fea, unq_inv, dim=0)[0]

It seems this step makes no point in the function.

Usually, we shuffle the data in the dataloader, which has been done automatically, instead of shuffle the date within the batch.

@hongfz16
Copy link
Owner

Hi,

Thanks for the question.

Actually, the shuffling operation here is preparing the data for the random sampling in this line. If we do not perform shuffling, then the sampling will not be random.

As for the scatter operation later, it has no relationship with the shuffling operation above. The above shuffling is done at the point level. Later the randomly sampled points will be converted to voxel by scatter operation.

If you have further confusion, feel free to continue this discussion.

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