Browse Source

Update plot_results()

5.0
Glenn Jocher 4 years ago
parent
commit
9dbaa1bbbe
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      utils/general.py

+ 2
- 2
utils/general.py View File

if not all(os.path.exists(x) for x in val): if not all(os.path.exists(x) for x in val):
print('\nWARNING: Dataset not found, nonexistant paths: %s' % [*val]) print('\nWARNING: Dataset not found, nonexistant paths: %s' % [*val])
if s and len(s): # download script if s and len(s): # download script
print('Attempting autodownload from: %s' % s)
print('Downloading %s ...' % s)
if s.startswith('http') and s.endswith('.zip'): # URL if s.startswith('http') and s.endswith('.zip'): # URL
f = Path(s).name # filename f = Path(s).name # filename
if platform.system() == 'Darwin': # avoid MacOS python requests certificate error if platform.system() == 'Darwin': # avoid MacOS python requests certificate error
y[y == 0] = np.nan # dont show zero loss values y[y == 0] = np.nan # dont show zero loss values
# y /= y[0] # normalize # y /= y[0] # normalize
label = labels[fi] if len(labels) else Path(f).stem label = labels[fi] if len(labels) else Path(f).stem
ax[i].plot(x, y, marker='.', label=label, linewidth=2, markersize=8)
ax[i].plot(x, y, marker='.', label=label, linewidth=1, markersize=6)
ax[i].set_title(s[i]) ax[i].set_title(s[i])
# if i in [5, 6, 7]: # share train and val loss y axes # 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]) # ax[i].get_shared_y_axes().join(ax[i], ax[i - 5])

Loading…
Cancel
Save