def __call__(self, src):
        """Augmenter body"""
        alpha = 1.0 + random.uniform(-self.saturation, self.saturation)
        gray = src * self.coef
        gray = nd.sum(gray, axis=2, keepdims=True)
        gray *= (1.0 - alpha)
        src *= alpha
        src += gray
        return src
def __call__ ( self , src ) : alpha = 1.0 + random . uniform ( - self . saturation , self . saturation ) gray = src * self . coef gray = nd . sum ( gray , axis = 2 , keepdims = True ) gray *= ( 1.0 - alpha ) src *= alpha src += gray return src
Augmenter body