Skip to content

Instantly share code, notes, and snippets.

@gurucharanmk
Created March 11, 2020 11:12
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 gurucharanmk/d95a4c78903b30d7530f3bb337ec4b44 to your computer and use it in GitHub Desktop.
Save gurucharanmk/d95a4c78903b30d7530f3bb337ec4b44 to your computer and use it in GitHub Desktop.
Code snippet for medium article
batch_tfms = [*aug_transforms(size=224, max_warp=0), Normalize.from_stats(*imagenet_stats)]
item_tfms = RandomResizedCrop(460, min_scale=0.75, ratio=(1.,1.))
bs=128
dls = ImageDataLoaders.from_folder(data_path, train='train', valid='val', batch_tfms=batch_tfms,
item_tfms=item_tfms, bs=bs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment