[Fix]: Change np.int to int (#636)
parent
fbe0ff6ec7
commit
1049791766
|
@ -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, \
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue