You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shouldn't it only sample from the samples the chosen subset in dataset.indices? When I try to run _get_labels as is, I get length mismatch. Is my implementation of subset unusual or should this be changed? Only returning the labels corresponding to dataset.indices solved this problem for me:
elif isinstance(dataset, torch.utils.data.Subset):
return [dataset.dataset.imgs[ind][1] for ind in dataset.indices]
The text was updated successfully, but these errors were encountered:
Hi everyone,
I have a question concering using subsets with this sampler. According to the code it chooses samples from all entries in the parent dataset:
imbalanced-dataset-sampler/torchsampler/imbalanced.py
Lines 49 to 50 in e9dd2de
Shouldn't it only sample from the samples the chosen subset in dataset.indices? When I try to run _get_labels as is, I get length mismatch. Is my implementation of subset unusual or should this be changed? Only returning the labels corresponding to dataset.indices solved this problem for me:
The text was updated successfully, but these errors were encountered: