Skip to content

Instantly share code, notes, and snippets.

@gchhablani
Last active May 17, 2020 08:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gchhablani/e66944a9df279a17a4db6dced667d22b to your computer and use it in GitHub Desktop.
Save gchhablani/e66944a9df279a17a4db6dced667d22b to your computer and use it in GitHub Desktop.
inp = torch.from_numpy(np.random.normal(0,1,size=(100,784))).to(device).float()
temp = vae(inp)
temp = temp.data.reshape(100,1,28,28)
grid = torchvision.utils.make_grid(temp,nrow=10)
print(grid.shape)
plt.imshow(grid.to('cpu').permute(1,2,0))
plt.gcf().set_size_inches(20,10)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment