Here the datasets contain only one dataset which is train_set. However in my case I had three datasets-train, valid and test. So they are given in a tuple. Thus the batch size should also be given in a tuple(even in the case of the same batch size for all datasets). This way, I solved the problem.