Is there an equivalent function pytorch's loss fuction nn.crossEntropyLoss() in keras?
I'm converting conv2d model written by pytorch to keras(Tensorflow 2.0).

I've almost done, but last question is delaying my work.

The title says it all: is there an equivalent function pytorch's loss fuction nn.crossEntropyLoss() in keras?

Thanks for your help.

Depending on type of your labels and outputs, there are currently three different entropy losses supported in Keras. 

categorical_crossentropy: 

keras.losses.categorical_crossentropy(y_true, y_pred, from_logits=False, label_smoothing=0)

sparse_categorical_crossentropy:

keras.losses.sparse_categorical_crossentropy(y_true, y_pred, from_logits=False, axis=-1)

binary_crossentropy:

keras.losses.binary_crossentropy(y_true, y_pred, from_logits=False, label_smoothing=0)

You can find a full list of Keras losses here
