Skip to content

Commit 45835fa

Browse files
committed
Made HierarchicalSampler extend Sampler instead of BatchSampler
1 parent a362638 commit 45835fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pytorch_metric_learning/samplers/hierarchical_sampler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
from collections import defaultdict
33

44
import torch
5-
from torch.utils.data.sampler import BatchSampler
5+
from torch.utils.data.sampler import Sampler
66

77
from ..utils import common_functions as c_f
88

99

1010
# Inspired by
1111
# https://github.com/kunhe/Deep-Metric-Learning-Baselines/blob/master/datasets.py
12-
class HierarchicalSampler(BatchSampler):
12+
class HierarchicalSampler(Sampler):
1313
def __init__(
1414
self,
1515
labels,

0 commit comments

Comments
 (0)