'Args:
white_prob (float), black_prob (float): probabilities setting an element to 255 or 0.'

def __init__(self, white_prob=0.05, black_prob=0.05):

    assert ((white_prob + black_prob) <= 1), 'Sum    of    probabilities    cannot    be    greater    than    1'
    super(SaltPepperNoise, self).__init__()
    self._init(locals())
