ROOT = ‘.data’
train_data = datasets.MNIST(root = ROOT,
train = True,
download = True)
mean = train_data.data.float().mean() / 255
std = train_data.data.float().std() / 255
train_transforms = transforms.Compose([
transforms.RandomRotation(5, fill=(0,)),
transforms.RandomCrop(28, padding = 2),
transforms.ToTensor(),
transforms.Normalize(mean = [mean], std = [std])
])
test_transforms = transforms.Compose([
transforms.ToTensor(),
transforms.Normalize(mean = [mean], std = [std])
])
VALID_RATIO = 0.9
n_train_examples = int(len(train_data) * VALID_RATIO)
n_valid_examples = len(train_data) - n_train_examples
train_data, valid_data = data.random_split(train_data,
[n_train_examples, n_valid_examples])
i need to devide the train_data into 10 chunk …please support me…i am new to pytorch