import torch


def add_noise(inputs):
    """ Adds noise to a tensor
    makes sure it stays between 0 and 1
    """
    noise = torch.clip(torch.randn_like(inputs)*0.01, min=0, max=1)
    return inputs + noise