ptrblck:

Try to create a TensorDataset passing the data and labels separately:
trainset = torch.utils.data.TensorDataset(
    torch.from_numpy(train_data.as_matrix()),
    torch.from_numpy(train_labels.as_matrix())
)



Thank you.
That solves the problem. The network trains but the loss is very high and the accuracy is very low compared to other models  trained on the same data set. I think I have a problem with the loss function.  If there is any hint or if there is a guide on how to choose the loss function, I would be grateful to have a look at it.
Kind Regards