Hi, I am new to pytorch and image segmentation(UNET). I am trying to train the UNet to generate binary masks(Grayscale) on retinal images(RGB) + masks (RGB). I am converting both the masks to grayscale for training. Please help me with the following questions:

The Mean IOU and Pixel Acc values are not getting computed. I am not entirely sure why? or if the function calls are active.
How to implement pixel wise cross entropy loss? which loss function works efficient in this case?
My training and validation loss values are very poor. Should I do anything different here?
How should I save the model and use it for the testing loop.
Thank you for your help.

Please find my code below.
Unet_Colab 4