-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Dear Dr Robert:
Thank you for your kindly sharing codes.
I encountered some issues in both PCAComputePointwise function and NeighborhoodBasedMappingFeatures function for KNN search when I run with the scannet dataset.
for example, in PCAComputePointwise:
if xyz_search.shape[0] > 1.6e7: xyz_query_keops = LazyTensor(xyz_query[:, None, :].double()) xyz_search_keops = LazyTensor(xyz_search[None, :, :].double()) else: xyz_query_keops = LazyTensor(xyz_query[:, None, :]) xyz_search_keops = LazyTensor(xyz_search[None, :, :]) d_keops = ((xyz_query_keops - xyz_search_keops) ** 2).sum(dim=2) neighbors = d_keops.argKmin(self.num_neighbors, dim=1)
The error message is "Arg at position 1 : is not contiguous "
So I revised the xyz_query and xyz_search before knn search and it works:
dtype = torch.cuda.FloatTensor if self.use_cuda else torch.FloatTensor xyz_query = xyz_query.contiguous().type(dtype) xyz_search = xyz_query.contiguous().type(dtype)
Have you ever meet this problem? I don't konw whether my revision is the right way to solve this problem. Is there another alternative solution?