This commit is contained in:
Glenn Jocher 2021-12-19 17:06:23 +01:00
parent a3f21ad154
commit b5954cc30a

View File

@ -245,7 +245,7 @@ def imshow(img, labels=None, pred=None, names=None, nmax=64, verbose=False, f=Pa
ax[i].imshow(blocks[i].squeeze().permute((1, 2, 0))) # cmap='gray'
ax[i].axis('off')
if labels is not None:
s = names[labels[i]] + f' - {names[pred[i]]}' if pred is not None else ''
s = names[labels[i]] + f'{names[pred[i]]}' if pred is not None else ''
ax[i].set_title(s)
plt.savefig(f, dpi=300, bbox_inches='tight')