diff --git a/deepmd/pt/model/atomic_model/linear_atomic_model.py b/deepmd/pt/model/atomic_model/linear_atomic_model.py index 6cede6a265..e6faabf5c5 100644 --- a/deepmd/pt/model/atomic_model/linear_atomic_model.py +++ b/deepmd/pt/model/atomic_model/linear_atomic_model.py @@ -201,7 +201,11 @@ def forward_atomic( aparam, ) # apply bias to each individual model - ener_list.append(model.apply_out_stat(raw_ret, mapping[extended_atype][:,:nloc])["energy"]) + ener_list.append( + model.apply_out_stat(raw_ret, mapping[extended_atype][:, :nloc])[ + "energy" + ] + ) weights = self._compute_weight(extended_coord, extended_atype, nlists_) fit_ret = { diff --git a/deepmd/pt/model/model/make_model.py b/deepmd/pt/model/model/make_model.py index ab3f3d0a8f..5a1edb7c1f 100644 --- a/deepmd/pt/model/model/make_model.py +++ b/deepmd/pt/model/model/make_model.py @@ -173,7 +173,7 @@ def forward_common( return model_predict @property - def out_bias(self)-> torch.Tensor: + def out_bias(self) -> torch.Tensor: return self.atomic_model.out_bias def change_out_bias(