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

Function plot_train

scripts/plot_loss.py:44–61  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

42 return y
43
44def plot_train(data):
45 plt.title(os.path.basename(sys.argv[1]) + ' Training Loss')
46 plt.xlabel('Iteration')
47 plt.ylabel('Loss')
48
49 loss_names = ['BBox Loss', 'Conf Loss', 'Mask Loss']
50
51 x = [x['iteration'] for x in data]
52 plt.plot(x, smoother([y['b'] for y in data]))
53 plt.plot(x, smoother([y['c'] for y in data]))
54 plt.plot(x, smoother([y['m'] for y in data]))
55
56 if data[0]['s'] is not None:
57 plt.plot(x, smoother([y['s'] for y in data]))
58 loss_names.append('Segmentation Loss')
59
60 plt.legend(loss_names)
61 plt.show()
62
63def plot_val(data):
64 plt.title(os.path.basename(sys.argv[1]) + ' Validation mAP')

Callers 1

plot_loss.pyFile · 0.85

Calls 3

smootherFunction · 0.85
plotMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected