It is my first day with pytorch, I should first learn it  
I found another way. So, for anyone:
train_feat and train_labl are numpy arrays with mnist with the shape I need.
mnist_dataset_train = torch.utils.data.TensorDataset(torch.from_numpy(train_feat).cuda(), torch.from_numpy(train_labl).cuda())
train_loader = torch.utils.data.DataLoader(mnist_dataset_train,batch_size=100,shuffle=True)
and just
for batch in train_loader: