best to implement your own.
cross entropy loss is something like this I think . . .
[0.1, 0.2, 0.7] (prediction) ------------------ [1.0, 0.0, 0.0] (target)
what you want is - (1.0 * log(0.1) + 0.0 * log(0.2) + 0.0 * log(0.7)) this is the cross entropy loss
so to translate that into code, you have prediction (a vector of length k) and target (a vector of length k, not nessesarily 1 hot)
what you would do would be something like -1 * sum(log(prediction) * target)
so this is what I have in my own code, hopefully it’s helpful

48 # simple cross entropy cost (might be numerically unstable if pred has 0)
49 def xentropy_cost(x_target, x_pred):
50     assert x_target.size() == x_pred.size(), 
51         "size fail ! "+str(x_target.size()) + " " + str(x_pred.size())
52     logged_x_pred = torch.log(x_pred)
53     cost_value = -torch.sum(x_target * logged_x_pred)
54     return cost_value