For other readers,
I found this function that satisfy this need from this link 473:
tensor = torch.tensor([[3,5,1,2],[3,1,5,3],[7,5,8,3]],dtype=torch.float)
print(tensor)
tensor.apply_(lambda x: (x+0.2))
print(tensor)