Skip to content

Commit

Permalink
fix reshape
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 Sep 25, 2024
1 parent aff0b42 commit e7aeca0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deepmd/dpmodel/utils/exclude_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ def build_type_exclude_mask(
index = xp.reshape(
xp.where(nlist == -1, xp.full_like(nlist, nall), nlist), (nf, nloc * nnei)
)
type_j = xp_take_along_axis(ae, index, axis=1).reshape(nf, nloc, nnei)
type_j = xp_take_along_axis(ae, index, axis=1)
type_j = xp.reshape(type_j, (nf, nloc, nnei))
type_ij = type_i[:, :, None] + type_j
# nf x (nloc x nnei)
type_ij = xp.reshape(type_ij, (nf, nloc * nnei))
Expand Down

0 comments on commit e7aeca0

Please sign in to comment.