Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deepmd/pt/model/descriptor/repflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,8 @@ def forward(
a_sw = a_sw.masked_fill(~a_nlist_mask, 0.0)
# set all padding positions to index of 0
# if the a neighbor is real or not is indicated by nlist_mask
nlist[nlist == -1] = 0
a_nlist[a_nlist == -1] = 0
nlist = torch.where(nlist == -1, 0, nlist)
a_nlist = torch.where(a_nlist == -1, 0, a_nlist)

# get node embedding
# [nframes, nloc, tebd_dim]
Expand Down
2 changes: 1 addition & 1 deletion deepmd/pt/model/descriptor/repformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def forward(

# set all padding positions to index of 0
# if the a neighbor is real or not is indicated by nlist_mask
nlist[nlist == -1] = 0
nlist = torch.where(nlist == -1, 0, nlist)
# nb x nall x ng1
if comm_dict is None:
assert mapping is not None
Expand Down
Loading