Skip to content

Commit

Permalink
remote filtration
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenWizard2015 committed Jul 2, 2024
1 parent 0f7e9e4 commit ddd0813
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions scripts/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,8 @@ def evaluate(onlyImproved=False):
pass

dists[i] = min(dist, dists[i]) # track the best distance
# filter the results by the distance, to ignore the outliers
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)
totalLoss.append(loss)
totalDist.append(dist)
continue
if not onlyImproved:
print('Mean loss: %.5f | Mean distance: %.5f' % (
Expand Down

0 comments on commit ddd0813

Please sign in to comment.