Course 4 week 3 Unet - Loss Function

Hello, Friends.

I am trying to understand the loss function.
I am performing a personal segmentation problem and in my task I have a single class/region to be identified, the rest is background.

Should I use the same SparseCategoricalCrossentropy?
I still did not get the from_logits=True meaning. Any clue?

I’m also taking those two warning errors:

W tensorflow/core/lib/png/] PNG warning: iCCP: profile 'ICC Profile': 'RGB ': RGB color space not permitted on grayscale PNG

Any help is welcomed.

Basically, the from_logits=True, means that you are not considering the softmax as activation in your classification layer. So, the loss values from your model are not normalized, which means your result can be more numerically stable.
Regarding the error message, I am guessing that you are missing parameters between RGB and grayscale.

Thank you, Carlos. I still have some questions about unet the way it is presented in the exercise and in the variation I am performing.

I’ll open a new thread. Thanks again