Hi,  My problem is related to this
Train simultaneously on two datasets 6.
I have two datasets, MNIST(60000) and USPS(9298).
I used torch.utils.data. ConcatDataset ( datasets ) to merge these two.
Now, when I use a batch size of anything other than 1 or 2, after the floor(len(first_dataset)/batch_size)iterations, I get this error,
" invalid argument 0: Tensors must have same number of dimensions: got 1 and 2 at /opt/conda/conda-bld/pytorch_1524584710464/work/aten/src/TH/generic/THTensorMath.c:3577".
I guess this is because of the torch.stack in default_collate_fn.
How do I write a new_collate_fn to overcome this problem?