WeightedRandomSampler Image Sequences list index out of range

It’s not straightforward to create weights for samples containing multiple targets and you could take a look at this post, which explains some potentially useful methods.