Created
July 26, 2020 04:02
-
-
Save itsuncheng/aaedf7d1e01e23d2ca6fada76558d564 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Grab a batch of real images from the dataloader | |
| real_batch = next(iter(dataloader)) | |
| # Plot the real images | |
| plt.figure(figsize=(15,15)) | |
| plt.subplot(1,2,1) | |
| plt.axis("off") | |
| plt.title("Real Images") | |
| plt.imshow(np.transpose(vutils.make_grid(real_batch[0].to(device)[:64], padding=5, normalize=True).cpu(),(1,2,0))) | |
| # Plot the fake images from the last epoch | |
| plt.subplot(1,2,2) | |
| plt.axis("off") | |
| plt.title("Fake Images") | |
| plt.imshow(np.transpose(img_list[-1],(1,2,0))) | |
| plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment