We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95aef5d commit afc4c38Copy full SHA for afc4c38
1 file changed
deepmd/tf/model/model.py
@@ -900,7 +900,10 @@ def serialize(self, suffix: str = "") -> dict:
900
901
ntypes = len(self.get_type_map())
902
dict_fit = self.fitting.serialize(suffix=suffix)
903
- if dict_fit.get("@variables", {}).get("bias_atom_e") is not None:
+ if (
904
+ dict_fit.get("@variables", {}).get("bias_atom_e") is not None
905
+ and dict_fit["dim_out"] == dict_fit["embedding_width"]
906
+ ):
907
out_bias = dict_fit["@variables"]["bias_atom_e"].reshape(
908
[1, ntypes, dict_fit["dim_out"]]
909
)
0 commit comments