Skip to content

Commit

Permalink
fix: try fix multitask
Browse files Browse the repository at this point in the history
  • Loading branch information
anyangml committed Apr 2, 2024
1 parent 194de07 commit bd89e3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deepmd/pt/model/task/fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ def get_sel_type(self) -> List[int]:
def __setitem__(self, key, value):
if key in ["bias_atom_e"]:
if isinstance(value, dict):
value = {k: v.view([self.ntypes, -1]) for k, v in value.items()}
#TODO: need to update to handle multiple properties
value = list(value.values())[0].view([self.ntypes, self._net_out_dim()])
else:
value = value.view([self.ntypes, self._net_out_dim()])
self.bias_atom_e = value
Expand Down

0 comments on commit bd89e3a

Please sign in to comment.