예제 #1
0
	def imshow_ext(self, img):
		#img = img / 2 + 0.5   # first convert back to [0,1] range from [-1,1] range
		unnormalized = cutils.UnNormalize(mean=self.means, std=self.stds)
		img = unnormalized(img)
		npimg = img.numpy()
		# convert from CHW to HWC
		plt.imshow(np.transpose(npimg, (1, 2, 0)))
예제 #2
0
def imshow_ext(img, means, stds):
    unnormalized = cutils.UnNormalize(mean=means, std=stds)
    img = unnormalized(img)
    npimg = img.numpy()
    plt.imshow(np.transpose(npimg, (1, 2, 0)))