nn.CrossEntropyLoss expects raw logits as the model output in the shape [batch_size, nb_classes, height, width] for a multi-class segmentation use case, so you should remove the sigmoid.
Also, the target should be a LongTensor in the shape [batch_size, height, width] containing the class indices in the range [0, nb_classes-1].
To get the predicted class labels you could use pred = torch.argmax(output, dim=1).