What do you mean by “it’s not working very well”?
If you make the output of your neural network softmax, and then take the log of it, it will be slower than logsoftmax and sometimes the output will be nan.
There are other loss functions, but cross-entropy loss is arguably the best one for probability distributions.