Does Gluon have CrossEntropyLoss

I know we have SoftmaxCrossEntropyLoss, but I already have a customized Softmax layer. Does Gluon have just CrossEntropyLoss like Keras? thanks

Got help from Haibin so I will answer my own question here:

Yes, set the argument from_logits to True in SoftmaxCrossEntropyLoss API then you will get the cross entropy loss without applying softmax on the outputs.

1 Like

Indeed, thanks for sharing your solution @apeforest ! :+1: