Hi,
My dataset contains handwritten text line images. You can see the example below:

a06-090-021804×144 51.7 KB

I am giving these images to CNN for feature extraction and then these features to BLSTM encoder and then LSTM decoder to decode single character per time step. We have 6161 line of images in train set. But the dataset having long tail. This can be seen in below histogram.

Trainset1500×1000 46.5 KB

The dataset contain 79 classes.  Samples doesn’t have a single target, rather it consists of sequence of classes.  The WeightedRandomSampler gets weights of different classes and try to create batches which contains equal number of sample based on the given weights.  Now the question is, this WeightedRandomSampler  can work on sequential data?