From ba9e07c5773c32e5c1cda0a61d0a47b87b5183d5 Mon Sep 17 00:00:00 2001 From: Huixian Cheng <65054204+huixiancheng@users.noreply.github.com> Date: Mon, 15 Jan 2024 17:48:22 +0800 Subject: [PATCH] Update core.py --- spconv/pytorch/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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