Skip to content

Commit

Permalink
no longer accessing energy err as tensor
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgoff committed Jan 12, 2024
1 parent 59c1113 commit 4e6a439
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fitsnap3lib/solvers/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ def error_analysis(self, a=None, b=None, w=None, fs_dict=None):
energies_model = energies_model.squeeze() # # Evaluating single config still returns 1D tensor; squeeze for scalar.
e_pred = energies_model.detach().numpy()/c.natoms # Model per-atom energy.
# Custom networks need a further index.
if (self.config.sections["CALCULATOR"].calculator == "LAMMPSCUSTOM"):
e_pred = e_pred[0]
#if (self.config.sections["CALCULATOR"].calculator == "LAMMPSCUSTOM"):
# e_pred = e_pred[0]

ae = abs(c.energy - e_pred)
se = (c.energy - e_pred)**2
Expand Down

0 comments on commit 4e6a439

Please sign in to comment.