Creating custom dataset C++

Im getting started with the C++ frontend, I wanted to ask how I could create a dataset from two tensors, one with labels and another with features

The torch::data::datasets::TensorDataset, which is the equivalent of torch.utils.data.TensorDataset in Python, might work.

Best regards

Thomas

Thanks, I have exactly same problem with how to use TensorDataset,

The python code is
return TensorDataset(torch.FloatTensor(np.array(data), torch.LongTensor(np.array(labels)))

May I ask how to convert the above in C++ please ?

I write torch::data::datasets::TensorDataset T1[]{};

How to send data and label to T1 in this case ?

Thanks.