Skip to content

Commit

Permalink
fix uninitilized type_embedding
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz committed Nov 7, 2024
1 parent 9605e9a commit 0fcd127
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deepmd/tf/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,8 @@ def deserialize(cls, data: dict, suffix: str = "") -> "Descriptor":
if descriptor.explicit_ntypes:
type_embedding = descriptor.type_embedding
fitting.dim_descrpt -= type_embedding.neuron[-1]
else:
type_embedding = None
# BEGINE not supported keys
data.pop("atom_exclude_types")
data.pop("pair_exclude_types")
Expand Down

0 comments on commit 0fcd127

Please sign in to comment.