add warning to plot_results()
This commit is contained in:
parent
7be71b02e2
commit
b574f765ce
|
@ -966,6 +966,7 @@ def plot_results(start=0, stop=0, bucket='', id=()): # from utils.utils import
|
|||
else:
|
||||
files = glob.glob('results*.txt') + glob.glob('../../Downloads/results*.txt')
|
||||
for f in sorted(files):
|
||||
try:
|
||||
results = np.loadtxt(f, usecols=[2, 3, 4, 8, 9, 12, 13, 14, 10, 11], ndmin=2).T
|
||||
n = results.shape[1] # number of rows
|
||||
x = range(start, min(stop, n) if stop else n)
|
||||
|
@ -978,6 +979,8 @@ def plot_results(start=0, stop=0, bucket='', id=()): # from utils.utils import
|
|||
ax[i].set_title(s[i])
|
||||
if i in [5, 6, 7]: # share train and val loss y axes
|
||||
ax[i].get_shared_y_axes().join(ax[i], ax[i - 5])
|
||||
except:
|
||||
print('Warning: Plotting error for %s, skipping file' % f)
|
||||
|
||||
fig.tight_layout()
|
||||
ax[1].legend()
|
||||
|
|
Loading…
Reference in New Issue