What is the best way to combine train and test data in torchvision and how can we do it?
Can someone explain how can we do it using ConcatDataset
?
I tried the following:
train = datasets.MNIST(root=dirpath, train=True, download=True, transform=trans)
test = datasets.MNIST(root=dirpath, train=False, download=True, transform=trans)
data_list = list()
data_list.append(train)
data_list.append(test)
total = ConcatDataset(data_list)
But it did not work.