Training Models at Scale
Train models at scale using Deep Lake
How to optimize Deep Lake for training models at scale

tform_simple = transforms.Compose(
[
transforms.Resize((128, 128)),
transforms.RandomAffine(20),
transforms.RandomHorizontalFlip(p=0.5),
transforms.ToTensor(),
transforms.Lambda(lambda x: x.repeat(int(3 / x.shape[0]), 1, 1)),
transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]),
]
)
tform_complex = transforms.Compose(
[
transforms.Resize((256, 256)),
transforms.RandomAffine(20),
transforms.RandomHorizontalFlip(p=0.5),
transforms.RandomVerticalFlip(p=0.5),
transforms.RandomPerspective(distortion_scale=0.5, p=0.5),
transforms.ColorJitter(brightness=0.2, contrast=0.2, saturation=0.2, hue=0.2),
transforms.ToTensor(),
transforms.Lambda(lambda x: x.repeat(int(3 / x.shape[0]), 1, 1)),
transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]),
]
)