That might be a problem of your model, if it only outputs one laben (e.g. the background class), or a visualization issue.
If you call torch.argmax on your output, you will get the most likely classes as indices.
Some libraries like matplotlib try to plot these “images” as uint8 in the range [0, 255].
As you class labels might be small, e.g. [0, 5] you might see only a dark image.
Try to convert your labels to colors using a colormap in this case.