def get_data_loaders(batch_size: int, model):
    'Helper method to create dataloaders for ssl, kNN train and kNN test\n\n    Args:\n        batch_size: Desired batch size for all dataloaders\n    '
    col_fn = collate_fn
    if isinstance(model, SwaVModel):
        col_fn = swav_collate_fn
    elif isinstance(model, DINOModel):
        col_fn = dino_collate_fn
    dataloader_train_ssl = torch.utils.data.DataLoader(dataset_train_ssl, batch_size=batch_size, shuffle=True, collate_fn=col_fn, drop_last=True, num_workers=num_workers)
    dataloader_train_kNN = torch.utils.data.DataLoader(dataset_train_kNN, batch_size=batch_size, shuffle=False, drop_last=False, num_workers=num_workers)
    dataloader_test = torch.utils.data.DataLoader(dataset_test, batch_size=batch_size, shuffle=False, drop_last=False, num_workers=num_workers)
    return (dataloader_train_ssl, dataloader_train_kNN, dataloader_test)
Helper method to create dataloaders for ssl, kNN train and kNN test

Args:
    batch_size: Desired batch size for all dataloaders
def get_data_loaders(batch_size: int, model):
    'Helper method to create dataloaders for ssl, kNN train and kNN test\n\n    Args:\n        batch_size: Desired batch size for all dataloaders\n    '
    col_fn = collate_fn
    if isinstance(model, SwaVModel):
        col_fn = swav_collate_fn
    elif isinstance(model, DINOModel):
        col_fn = dino_collate_fn
    dataloader_train_ssl = torch.utils.data.DataLoader(dataset_train_ssl, batch_size=batch_size, shuffle=True, collate_fn=col_fn, drop_last=True, num_workers=num_workers)
    dataloader_train_kNN = torch.utils.data.DataLoader(dataset_train_kNN, batch_size=batch_size, shuffle=False, drop_last=False, num_workers=num_workers)
    dataloader_test = torch.utils.data.DataLoader(dataset_test, batch_size=batch_size, shuffle=False, drop_last=False, num_workers=num_workers)
    return (dataloader_train_ssl, dataloader_train_kNN, dataloader_test)