Created
November 1, 2020 00:16
-
-
Save SamratSahoo/360c9c4fe5c1eb65f9c250d5cefb3328 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
if __name__ == '__main__': | |
model = Autoencoder() | |
model.trainModel() | |
tensor = model.testImage(7777) | |
# Reshape | |
tensor = torch.reshape(tensor, (28, 28)) | |
# toImage function | |
toImage = torchvision.transforms.ToPILImage() | |
# Convert to image | |
image = toImage(tensor) | |
# Save image | |
image.save('After.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment