no i do not want to apply it randomly, I would like to normalize the full dataset between, i am more familiar with torchvision.transforms  methods but you mentioned that  functional API  is better for segmentation tasks , also i tried the torchvision.transforms with Unet model it gives me a negative loss while when i used functional API the loss as low at the beginning and then started to be Nan