The low-level sampling functions should be there, I don’t think torch.distributions has an equivalent in C++. However, in terms of process I’d recommend to assign each datapoint to a fold ahead of time.
Best regards
Thomas