For a multi-label classification/segmentation you cannot use torch.argmax, but could use a threshold to get the predictions for each sample/pixel.
However, this also won’t work with nn.CrossEntropyLoss, which is used for a multi-class classfication/segmentation, so use nn.BCEWithLogitsLoss instead.