You can use the torch.randn_like() function to create a noisy tensor of the same size of input. Then add it.
In your case ,
def add_noise(inputs):
     noise = torch.randn_like(inputs)
     return inputs + noise