Skip to content

Commit

Permalink
Fix tensor conversion device argument
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz authored Jan 18, 2025
1 parent cbf7536 commit 953f243
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deepmd/pd/model/descriptor/se_atten_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def deserialize(cls, data: dict) -> "DescrptSeAttenV2":
obj = cls(**data)

def t_cvt(xx):
return paddle.to_tensor(xx, dtype=obj.se_atten.prec, device=env.DEVICE)
return paddle.to_tensor(xx, dtype=obj.se_atten.prec, place=env.DEVICE)

obj.type_embedding.embedding = TypeEmbedNetConsistent.deserialize(
type_embedding
Expand Down

0 comments on commit 953f243

Please sign in to comment.