From 084a3890db88043634ccbb3974f1ef584e19dfd5 Mon Sep 17 00:00:00 2001 From: Jiaqi Wang <1155098160@link.cuhk.edu.hk> Date: Mon, 8 Jul 2019 20:30:48 +0800 Subject: [PATCH] fix a potential bug in GroupSampler (#955) --- mmdet/datasets/loader/sampler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmdet/datasets/loader/sampler.py b/mmdet/datasets/loader/sampler.py index f45ba1325d5..c222eb29341 100644 --- a/mmdet/datasets/loader/sampler.py +++ b/mmdet/datasets/loader/sampler.py @@ -67,7 +67,7 @@ def __iter__(self): range(len(indices) // self.samples_per_gpu)) ] indices = np.concatenate(indices) - indices = torch.from_numpy(indices).long() + indices = indices.astype(np.int64).tolist() assert len(indices) == self.num_samples return iter(indices)