That’s weird
I tried replicating that dataloader and it works fine with cuda.FloatTensor and cuda.IntTensor, it only raises Type Error when I create the dataset with Variables (as expected).
Do you perform some preprocessing on the Tensors? Some operation that may be changing your data into Variables? Did you check the data type just before creating the dataset?
Just to be sure, can you try:
mlp_train_dataset = torch.utils.data.TensorDataset(mlp_train_inputs.data, mlp_train_targets.data)