arshishir:

    def __getitem__(self, index):
        global b
        img = self.data[index][0]
        b = b + 1 
        return add_noise_sp(img,b), img



You are adding noise while getting every new item in these lines.  If you want a fixed noise, one way is to add noise to tensors manually and use TensorDataset.