Created
August 12, 2022 17:29
-
-
Save SubhadityaMukherjee/1a30eb09e4a561910380ab224222f36d to your computer and use it in GitHub Desktop.
dls
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
path = Path(root_dir) # base path | |
fields = DataBlock( | |
blocks=(ImageBlock, CategoryBlock), | |
get_items=get_image_files, | |
get_y=get_parent_name, | |
splitter=RandomSplitter(valid_pct=0.2, seed=42), | |
item_tfms=RandomResizedCrop(64, min_scale=0.5), | |
batch_tfms=aug_transforms(), | |
) | |
dls = fields.dataloaders(path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment