def prepare_transforms(dataset: str) -> Tuple[(nn.Module, nn.Module)]:
    'Prepares pre-defined train and test transformation pipelines for some datasets.\n\n    Args:\n        dataset (str): dataset name.\n\n    Returns:\n        Tuple[nn.Module, nn.Module]: training and validation transformation pipelines.\n    '
    cifar_pipeline = {'T_train': transforms.Compose([transforms.RandomResizedCrop(size=32, scale=(0.08, 1.0)), transforms.RandomHorizontalFlip(), transforms.ToTensor(), transforms.Normalize((0.4914, 0.4822, 0.4465), (0.247, 0.243, 0.261))]), 'T_val': transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.4914, 0.4822, 0.4465), (0.247, 0.243, 0.261))])}
    stl_pipeline = {'T_train': transforms.Compose([transforms.RandomResizedCrop(size=96, scale=(0.08, 1.0)), transforms.RandomHorizontalFlip(), transforms.ToTensor(), transforms.Normalize((0.4914, 0.4823, 0.4466), (0.247, 0.243, 0.261))]), 'T_val': transforms.Compose([transforms.Resize((96, 96)), transforms.ToTensor(), transforms.Normalize((0.4914, 0.4823, 0.4466), (0.247, 0.243, 0.261))])}
    imagenet_pipeline = {'T_train': transforms.Compose([transforms.RandomResizedCrop(size=224, scale=(0.08, 1.0)), transforms.RandomHorizontalFlip(), transforms.ToTensor(), transforms.Normalize(mean=(0.485, 0.456, 0.406), std=(0.228, 0.224, 0.225))]), 'T_val': transforms.Compose([transforms.Resize(256), transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize(mean=(0.485, 0.456, 0.406), std=(0.228, 0.224, 0.225))])}
    custom_pipeline = build_custom_pipeline()
    pipelines = {'cifar10': cifar_pipeline, 'cifar100': cifar_pipeline, 'stl10': stl_pipeline, 'imagenet100': imagenet_pipeline, 'imagenet': imagenet_pipeline, 'custom': custom_pipeline}
    assert (dataset in pipelines)
    pipeline = pipelines[dataset]
    T_train = pipeline['T_train']
    T_val = pipeline['T_val']
    return (T_train, T_val)
Prepares pre-defined train and test transformation pipelines for some datasets.

Args:
    dataset (str): dataset name.

Returns:
    Tuple[nn.Module, nn.Module]: training and validation transformation pipelines.
def prepare_transforms(dataset: str) -> Tuple[(nn.Module, nn.Module)]:
    'Prepares pre-defined train and test transformation pipelines for some datasets.\n\n    Args:\n        dataset (str): dataset name.\n\n    Returns:\n        Tuple[nn.Module, nn.Module]: training and validation transformation pipelines.\n    '
    cifar_pipeline = {'T_train': transforms.Compose([transforms.RandomResizedCrop(size=32, scale=(0.08, 1.0)), transforms.RandomHorizontalFlip(), transforms.ToTensor(), transforms.Normalize((0.4914, 0.4822, 0.4465), (0.247, 0.243, 0.261))]), 'T_val': transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.4914, 0.4822, 0.4465), (0.247, 0.243, 0.261))])}
    stl_pipeline = {'T_train': transforms.Compose([transforms.RandomResizedCrop(size=96, scale=(0.08, 1.0)), transforms.RandomHorizontalFlip(), transforms.ToTensor(), transforms.Normalize((0.4914, 0.4823, 0.4466), (0.247, 0.243, 0.261))]), 'T_val': transforms.Compose([transforms.Resize((96, 96)), transforms.ToTensor(), transforms.Normalize((0.4914, 0.4823, 0.4466), (0.247, 0.243, 0.261))])}
    imagenet_pipeline = {'T_train': transforms.Compose([transforms.RandomResizedCrop(size=224, scale=(0.08, 1.0)), transforms.RandomHorizontalFlip(), transforms.ToTensor(), transforms.Normalize(mean=(0.485, 0.456, 0.406), std=(0.228, 0.224, 0.225))]), 'T_val': transforms.Compose([transforms.Resize(256), transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize(mean=(0.485, 0.456, 0.406), std=(0.228, 0.224, 0.225))])}
    custom_pipeline = build_custom_pipeline()
    pipelines = {'cifar10': cifar_pipeline, 'cifar100': cifar_pipeline, 'stl10': stl_pipeline, 'imagenet100': imagenet_pipeline, 'imagenet': imagenet_pipeline, 'custom': custom_pipeline}
    assert (dataset in pipelines)
    pipeline = pipelines[dataset]
    T_train = pipeline['T_train']
    T_val = pipeline['T_val']
    return (T_train, T_val)