MCPcopy
hub / github.com/dbolya/yolact / smoother

Function smoother

scripts/plot_loss.py:35–42  ·  view source on GitHub ↗
(y, interval=100)

Source from the content-addressed store, hash-verified

33
34
35def smoother(y, interval=100):
36 avg = MovingAverage(interval)
37
38 for i in range(len(y)):
39 avg.append(y[i])
40 y[i] = avg.get_avg()
41
42 return y
43
44def plot_train(data):
45 plt.title(os.path.basename(sys.argv[1]) + ' Training Loss')

Callers 1

plot_trainFunction · 0.85

Calls 3

appendMethod · 0.95
get_avgMethod · 0.95
MovingAverageClass · 0.90

Tested by

no test coverage detected