Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 24, 2024
1 parent d097bfa commit f7cf9e1
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions deepmd/pt/model/model/property_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,8 @@ def forward(
do_atomic_virial=do_atomic_virial,
)
model_predict = {}
model_predict[f"atom_{self.get_var_name()}"] = model_ret[
self.get_var_name()
]
model_predict[self.get_var_name()] = model_ret[
f"{self.get_var_name()}_redu"
]
model_predict[f"atom_{self.get_var_name()}"] = model_ret[self.get_var_name()]
model_predict[self.get_var_name()] = model_ret[f"{self.get_var_name()}_redu"]
if "mask" in model_ret:
model_predict["mask"] = model_ret["mask"]
return model_predict
Expand Down Expand Up @@ -111,12 +107,8 @@ def forward_lower(
extra_nlist_sort=self.need_sorted_nlist_for_lower(),
)
model_predict = {}
model_predict[f"atom_{self.get_var_name()}"] = model_ret[
self.get_var_name()
]
model_predict[self.get_var_name()] = model_ret[
f"{self.get_var_name()}_redu"
]
model_predict[f"atom_{self.get_var_name()}"] = model_ret[self.get_var_name()]
model_predict[self.get_var_name()] = model_ret[f"{self.get_var_name()}_redu"]
if "mask" in model_ret:
model_predict["mask"] = model_ret["mask"]
return model_predict

0 comments on commit f7cf9e1

Please sign in to comment.