diff --git a/spconv/pytorch/core.py b/spconv/pytorch/core.py index c4f90fd..f459b2a 100644 --- a/spconv/pytorch/core.py +++ b/spconv/pytorch/core.py @@ -215,7 +215,7 @@ def replace_feature(self, feature: torch.Tensor): def select_by_index(self, valid_indices: torch.Tensor): new_spt = self.shadow_copy() new_spt.indices = self.indices[valid_indices] - new_spt.features = self.features[valid_indices] + new_spt = new_spt.replace_feature(self.features[valid_indices]) # reuse data must be cleared after modify indices new_spt.indice_dict.clear() return new_spt