The expected shape of the target tensor for a multi-class segmentation use case is [batch_size, height, width] containing the class indices, while your target seems to have the unwanted channel dimension.
How did you create the target?