conv neural network - Pytorch semantic segmentation loss ...
https://stackoverflow.com/.../pytorch-semantic-segmentation-loss-function08.05.2021 · Binary cross-entropy, as the name suggests is a loss function you use when you have a binary segmentation map. The CrossEntropy function, in PyTorch, expects the output from your model to be of the shape - [batch, num_classes, H, W] (pass this directly to your loss function) and the ground truth to be of shape [batch, H, W] where H, W in your case is 256, 256.