Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenWizard2015 committed Jun 29, 2024
1 parent 2f22c74 commit 0f7e9e4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,15 @@ def evaluate(onlyImproved=False):

dists[i] = min(dist, dists[i]) # track the best distance
# filter the results by the distance, to ignore the outliers
if dists[i] < 0.1:
maxValue = 0.1
if dists[i] < maxValue:
totalLoss.append(loss)
totalDist.append(dist)
else:
# prevent the big "jumps" in the loss and distance when the model is becoming better
# assuming that maxValue is bigger than the corresponding loss
totalLoss.append(maxValue)
totalDist.append(maxValue)
continue
if not onlyImproved:
print('Mean loss: %.5f | Mean distance: %.5f' % (
Expand Down

0 comments on commit 0f7e9e4

Please sign in to comment.