The output shape indicates a multi-classification use case for volumetric data as it would correspond to logits in [batch_size, nb_classes, depth, height, width].
If you are working an a binary classification use case the output is expected to have the shape [batch_size, nb_classes2] while the target should have the shape [batch_size] and contain values in the range [0, nb_classes=2].
Currently your label tensor also seems to be one-hot encoded so use labels = torch.argmax(labels,. dim=1) if that’s the case.