第一种 原文 class RandomErasing(object): def __init__(self, p=0.5, sl=0.02, sh=0.4, r1=0.3, r2=3): self.p = p self.sl = sl self.sh = sh self.r1 = r1 self.r2 = r2 def __call__(self, img): if np.random.rand() > self.p: return img i