Hello,I found someone use it like this:
celoss(logits,mask)
here
logits has shape [2, 22, 256, 256]
mask has shape [2, 256, 256]
and category type is encoded into mask,for example,if a pixel is belongs to a people,it will has value==17(human’s code in VOC dataset).
Will CELoss one-hot encode mask to generate 22 channels firstly,then pairing generated mask channels with logit channels one by one to compute cross entropy?