Skip to content

Commit 9b68fe2

Browse files
committed
remove script codes
1 parent 9c14ecd commit 9b68fe2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

deepmd/pt/model/network/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
has_torch_scatter = False
1414

1515

16-
@torch.jit.script
1716
def aggregate(
1817
data: torch.Tensor,
1918
owners: torch.Tensor,
@@ -37,6 +36,7 @@ def aggregate(
3736
-------
3837
output: [num_owner, feature_dim]
3938
"""
39+
# faster and recommended
4040
if has_torch_scatter:
4141
output = torch_scatter.segment_coo(
4242
src=data,
@@ -46,7 +46,7 @@ def aggregate(
4646
)
4747
return output
4848

49-
# if torch_scatter is not available, use index_add_
49+
# if torch_scatter is not available, use native index_add
5050
if num_owner is None or average:
5151
# requires bincount
5252
bin_count = torch.bincount(owners)

0 commit comments

Comments
 (0)