def Normalize(tensor, mean, std):
    """
    Given mean: (R, G, B) and std: (R, G, B),
    will normalize each channel to `channel = (channel - mean) / std`
    Given mean: GreyLevel and std: GrayLevel,
    will normalize the channel to `channel = (channel - mean) / std`

    :param tensor: image tensor to be normalized
    :param mean: mean of every channel
    :param std: standard variance of every channel
    :return: normalized tensor
    """
    for t, m, s in zip(tensor, mean, std):
        t -= m
        t /= s
    return tensor