[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)))
|
l, size_per_label, replace=(len(l) <= size_per_label)))
|
||||||
indices = np.array(indices)
|
indices = np.array(indices)
|
||||||
np.random.shuffle(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
|
# add extra samples to make it evenly divisible
|
||||||
assert len(indices) <= self.total_size, \
|
assert len(indices) <= self.total_size, \
|
||||||
|
|
|
@ -198,7 +198,7 @@ class BEiTMaskGenerator(BaseTransform):
|
||||||
Returns:
|
Returns:
|
||||||
dict: Result dict with added key ``mask``.
|
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
|
mask_count = 0
|
||||||
while mask_count != self.num_masking_patches:
|
while mask_count != self.num_masking_patches:
|
||||||
max_mask_patches = self.num_masking_patches - mask_count
|
max_mask_patches = self.num_masking_patches - mask_count
|
||||||
|
|
Loading…
Reference in New Issue