I want to normalize the output,for example,my batch size is 64 ,I will normalize for each line
def x_normalization(x):
       num_pic,_=x.data.shape
       for i in range(num_pic):
            x[i,:]=x[i,:]/torch.max(x[i,:])    #normalize for each line
       return x

I call this function in

I get a error
one of the variables needed for gradient computation has been modified by an inplace operation