Note that BCELoss and BCEWithLogitsLoss is for binary labels.
There’s NLLLoss, i.e., negative log-likelihood, https://pytorch.org/docs/stable/nn.html#nllloss 363 (operates on softmax output) and CrossEntropyLoss, which already combines the softmax plus the negative-likelihood for you:
https://pytorch.org/docs/stable/nn.html#crossentropyloss 648
Also note that CrossEntropyLoss uses nn.LogSoftmax, not nn.Softmax – the log version is numerically more stable (not sure how TensorFlow implements their negative log likelihood cost func though, i.e., whether they use log softmax or softmax on the logits). You could combine nn.Softmax and nn.LLLOSS if you like and see if that replicates the TensorFlow outputs.
The convergence difference you mentioned can have many different reasons including the random seed for the weight initialization and the optimizer parameterization.
import torch.nn.functional as F
loss = F.nll_loss(F.softmax(input), target)

The disadvantage of using softmax and the NLL loss separately is that it’s numerical less stable than using the derivative of the NLL loss with respect to the activation function directly.
I am not sure about the “sparse” part though, but it shouldn’t affect the results.