Skip to content

Commit

Permalink
fix the shape of idx_i and idx_j
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
  • Loading branch information
njzjz committed Nov 21, 2024
1 parent 289ebac commit 65da179
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deepmd/dpmodel/descriptor/dpa1.py
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ def call(
),
(-1),
)
idx_j = nei_type
idx_j = xp.reshape(nei_type, (-1,))
# (nf x nl x nnei) x ng
idx = xp.tile(xp.reshape((idx_i + idx_j), (-1, 1)), (1, ng))
# (ntypes) * ntypes * nt
Expand Down
2 changes: 1 addition & 1 deletion deepmd/pt/model/descriptor/se_atten.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ def forward(
idx_i = torch.tile(
atype.reshape(-1, 1) * ntypes_with_padding, [1, nnei]
).view(-1)
idx_j = nei_type
idx_j = nei_type.view(-1)
# (nf x nl x nnei) x ng
idx = (
(idx_i + idx_j)
Expand Down

0 comments on commit 65da179

Please sign in to comment.