forked from BVLC/caffe
-
Notifications
You must be signed in to change notification settings - Fork 263
/
plot_train_loss.py
executable file
·25 lines (20 loc) · 788 Bytes
/
plot_train_loss.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python
import sys
import argparse
try:
import seaborn as sns
sns.set(style="dark")
except ImportError:
pass
import matplotlib.pyplot as plt
from common_plot import parse_files, plot_loss, plot_train_loss
parser = argparse.ArgumentParser(description="Plot loss from log files.")
parser.add_argument('-v', dest='value_at_hover', action='store_true',
help="Display plot values at cursor hover")
parser.add_argument('-s', dest='separate', action='store_true',
help="plot each log separately, don't concatenate them")
parser.add_argument('log', nargs = '*', help = "list of log files.")
args = parser.parse_args()
data = parse_files(files=args.log, separate=args.separate)
plt = plot_train_loss(data=data, value_at_hover=args.value_at_hover)
plt.show()