Returning more than 2 tensors in libtorch

Hello all ,
I am writing a simple dataloader for an object detection task and trying to return 3 tensors from the get method. However I intended to return a tuple containing all three but I am unable to do so as the return type is torch::data::Example. Could anyone please guide me as to how I can return all three tensors?

Wouldn’t returning all 3 tensors work with torch::data::Example as given e.g. in the get method of your dataset:

torch::data::Example<> get(size_t i) {
    return {torch::ones(i), torch::ones(i), torch::ones(i)};

I did try that but it threw an error saying no matching constructor found and I was only able to return at most two tensors.
Anyway I will try that once again. Thanks a lot for replying ptrbk.