I mean that if I pass .data to normalize everything works fine, the modifications are not done to the variable in the main function:
x=Variable(torch.zeros(10,10).normal_(0,1)
new_x=normalize(x.data)
print new_x.sum()==x.data.sum() #return false

###############
###############
x=Variable(torch.zeros(10,10).normal_(0,1)
new_x=normalize(x)
print new_x.sum()==x.data.sum() #return True

In this example normalize function is different. For the last case is the example I posted. For the first one is:
def normalize(y_):
	min_val_aux,ind=torch.min(y_,1)   
	max_val_aux,ind=torch.max(y_,1)
	min_val = torch.zeros(100,1).cuda()
	max_val = torch.zeros(100,1).cuda()                                                     
	min_val[:,0]=min_val_aux                                                          
	max_val[:,0]=max_val_aux 
	a,b=y_.shape
	min_val=min_val.expand(100,b)
	max_val=max_val.expand(100,b)
	
	y_=(y_-min_val)/(max_val-min_val)
	return y_.cpu()

i.e. take out .data from y_