Normalize to maximum to [0,1] range

Is there any way that I can normalize the tensor to the maximum (in range of 0,1) in my network layers? Because the label images I have are normalized to the max pixel values of each image. I would like to have an output in the same scales.
Can I write a layer use torch.max(), like a/torch.max(a,0)?