[Fix]: Change np.int to int (#636)

pull/637/head
Yuan Liu 2022-12-19 15:14:03 +08:00 committed by GitHub
parent fbe0ff6ec7
commit 1049791766
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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, \

View File

@ -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