Hi,
I have a sequential data set with shape (n_time_points, n_features). Obviously, I want my batches to contain consecutive timepoint sequences, but I also want to randomly split them up into training, validation and test batches. Going through the tutorials and forums, I came across some of the relevant classes (Dataset, Sebset, DataLoader, SequentialSampler, BatchSampler), but I can’t quite figure out how to combine them to achieve what I want. The methods I’ve found seemed to either shuffle the timepoints within a sequence or create subsets with consecutive batches. The seq-to-seq tutorial actually implements the data loading functions from scratch, which doesn’t seem like a great idea for me, especially if at some point I want to parallelize on multiple GPU, etc. For simplicity, I’m first trying a batch_size of 1, i.e. I just want to sample 1 n_bptt-length sequence at a time, but at some point I might want to use a larger one.
(As you might’ve guessed, I’m pretty new to PyTorch. Any help would be highly appreciated.)