Skip to content

Commit

Permalink
Do not divide by 0 for deep atom value movement.
Browse files Browse the repository at this point in the history
  • Loading branch information
dickensc committed Sep 12, 2023
1 parent 3028ff9 commit 92306a3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,9 @@ protected void measureEpochParameterMovement() {
deepAtomValueMovement += Math.pow(epochStartDeepAtomValues[i] - trainFullTermStore.getAtomStore().getAtomValues()[i], 2.0f);
}
}
deepAtomValueMovement = deepAtomValueMovement / numDeepAtoms;
if (numDeepAtoms > 0) {
deepAtomValueMovement = deepAtomValueMovement / numDeepAtoms;
}
log.trace("Epoch Deep Atom Value Movement: {}", deepAtomValueMovement);

// By default, there are no internal parameters.
Expand Down

0 comments on commit 92306a3

Please sign in to comment.