Skip to content

Commit cc85a6d

Browse files
authored
fix(dpmodel): rmse_e loss normalized by n_atoms (#5124)
Consistent with other backends. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved energy RMSE metric display by normalizing reported values per atom, ensuring more accurate representation in loss monitoring. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent e22852e commit cc85a6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deepmd/dpmodel/loss/ener.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def call(
180180
)
181181
loss += pref_e * l_huber_loss
182182
more_loss["rmse_e"] = self.display_if_exist(
183-
xp.sqrt(l2_ener_loss), find_energy
183+
xp.sqrt(l2_ener_loss) * atom_norm_ener, find_energy
184184
)
185185
if self.has_f:
186186
l2_force_loss = xp.mean(xp.square(diff_f))

0 commit comments

Comments
 (0)