MCPcopy Create free account
hub / github.com/KeepTryingTo/Pytorch-GAN / save_images

Function save_images

VAE_AutoEncoder/utils.py:65–74  ·  view source on GitHub ↗
(imgs,epoch,step)

Source from the content-addressed store, hash-verified

63 plt.savefig('logs/figure.png')
64
65def save_images(imgs,epoch,step):
66 imgs = imgs.detach().cpu().numpy()
67 imgs = np.squeeze(imgs)
68 fig = plt.figure(figsize=(2,2))
69 for i in range(4):
70 plt.subplot(2,2,i + 1)
71 plt.imshow((imgs[i] + 1) / 2)
72 plt.axis("off")
73 plt.savefig(os.path.join(config.SAVE_IMAGES,str(epoch)+"_"+str(step)+'.png'))
74 print("\n================================>Saving images...")
75
76def plot_predictions(y_true,y_pred,step,epoch):
77 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected