How to visualize segmentation result with CrossEntropyLoss
In either case (with or without using nn.LogSoftMax()) you should do some argmax operation to get the class from probabilities.

The reason for that is that order of probabilities will always stay the same after the nn.LogSoftmax() since that operation squeezes the numbers in the [0, 1] interval, but keeps the ordering (biggest one before this operation will also remain the biggest in the [0, 1] interval, and so on ...).

Hence, for the purpose of determinating the class, it doesn't matter whether you do nn.LogSoftmax() or not.

nn.LogSoftmax() is needed only during the training process in order to calculate the loss and backpropagate that information to update the parameters of the network.