diff --git a/mmselfsup/datasets/samplers/deepcluster_sampler.py b/mmselfsup/datasets/samplers/deepcluster_sampler.py index d3b3c90f..c85413ff 100644 --- a/mmselfsup/datasets/samplers/deepcluster_sampler.py +++ b/mmselfsup/datasets/samplers/deepcluster_sampler.py @@ -101,7 +101,7 @@ class DeepClusterSampler(DefaultSampler): l, size_per_label, replace=(len(l) <= size_per_label))) indices = np.array(indices) np.random.shuffle(indices) - indices = indices[:N].astype(np.int).tolist() + indices = indices[:N].astype(int).tolist() # add extra samples to make it evenly divisible assert len(indices) <= self.total_size, \ diff --git a/mmselfsup/datasets/transforms/processing.py b/mmselfsup/datasets/transforms/processing.py index f673b6f4..b6dfb362 100644 --- a/mmselfsup/datasets/transforms/processing.py +++ b/mmselfsup/datasets/transforms/processing.py @@ -198,7 +198,7 @@ class BEiTMaskGenerator(BaseTransform): Returns: dict: Result dict with added key ``mask``. """ - mask = np.zeros(shape=self.get_shape(), dtype=np.int) + mask = np.zeros(shape=self.get_shape(), dtype=int) mask_count = 0 while mask_count != self.num_masking_patches: max_mask_patches = self.num_masking_patches - mask_count