We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a362638 commit 45835faCopy full SHA for 45835fa
src/pytorch_metric_learning/samplers/hierarchical_sampler.py
@@ -2,14 +2,14 @@
2
from collections import defaultdict
3
4
import torch
5
-from torch.utils.data.sampler import BatchSampler
+from torch.utils.data.sampler import Sampler
6
7
from ..utils import common_functions as c_f
8
9
10
# Inspired by
11
# https://github.com/kunhe/Deep-Metric-Learning-Baselines/blob/master/datasets.py
12
-class HierarchicalSampler(BatchSampler):
+class HierarchicalSampler(Sampler):
13
def __init__(
14
self,
15
labels,
0 commit comments