In case anyone ever has this problem, make sure that the length of your weights vector is <= the total number of samples in your Dataset. Also, num_samples in the WeightedRandomSampler should be the total length of the dataset if you want the entire dataset to be included in the samples.