Last active
July 3, 2020 11:08
-
-
Save pranshuj73/223a6b1bd57bbf5651c0f3c54e102175 to your computer and use it in GitHub Desktop.
This file contains 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
# this is for the transforms | |
train_trfm = transforms.Compose( | |
[ | |
transforms.ToPILImage(), | |
transforms.Grayscale(num_output_channels=1), | |
transforms.RandomCrop(48, padding=4, padding_mode='reflect'), | |
transforms.RandomHorizontalFlip(), | |
transforms.ToTensor(), | |
transforms.Normalize((0.5), (0.5), inplace=True) | |
]) | |
val_trfm = transforms.Compose( | |
[ | |
transforms.ToPILImage(), | |
transforms.Grayscale(num_output_channels=1), | |
transforms.ToTensor(), | |
transforms.Normalize((0.5), (0.5)) | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment