Hello,I have
outputs like [B,C,H,W]
and
targets like [B,H,W] ,where each pixel may be the one of [0,1,2,3,4] for background+4 classes
and BCEWithLogitsLoss(outputs,targets) gives me
ValueError: Target size (torch.Size([32, 224, 416])) must be the same as input size (torch.Size([32, 4, 224, 416]))
Is one-hot encoding target the only way,or any loss support this kind of targets directly?