def create(model_config, batch_size, normalize=True, num_workers=<NUM_LIT:0>, augmentations=None):
path = model_config.data_dir('<STR_LIT>')<EOL>train_dataset = datasets.MNIST(path, train=True, download=True)<EOL>test_dataset = datasets.MNIST(path, train=False, download=True)<EOL>augmentations = [ToArray()] + (augmentations if augmentations is not None else [])<EOL>if normalize:<EOL><INDENT>train_data = train_dataset.train_data<EOL>mean_value = (train_data.double() / <NUM_LIT:255>).mean().item()<EOL>std_value = (train_data.double() / <NUM_LIT:255>).std().item()<EOL>augmentations.append(Normalize(mean=mean_value, std=std_value, tags=['<STR_LIT:train>', '<STR_LIT>']))<EOL><DEDENT>augmentations.append(ToTensor())<EOL>return TrainingData(<EOL>train_dataset,<EOL>test_dataset,<EOL>num_workers=num_workers,<EOL>batch_size=batch_size,<EOL>augmentations=augmentations<EOL>)<EOL>
Create a MNIST dataset, normalized