Thanks for the reply!
In the examples that I found online (https://github.com/pytorch/examples/blob/master/cpp/custom-dataset/custom-dataset.cpp), a batch returned from a dataloader had data and target properties. When I use the approach you mention above, the returned batch is of type std::vector<MyClassForExample> This makes sense I guess…since that’s what I told it to return, I’m just curious about how the properties of the Example class (data and target) are available in a returned batch otherwise?
Does the map method of dataset have anything to do with that? What exactly does map do? Specifically what does it do with the Stack transform. Why do people need to “stack” their examples if the make_data_loader takes in the batch size as well…isn’t that the same kind of thing?
Thanks again,
Jack