> For the complete documentation index, see [llms.txt](https://deeplearning4j.konduit.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://deeplearning4j.konduit.ai/en-1.0.0-beta6/keras-import/supported-features/losses.md).

# Losses

DL4J supports all available [Keras losses](https://keras.io/losses) (except for `logcosh`), namely:

* &#x20;mean\_squared\_error
* &#x20;mean\_absolute\_error
* &#x20;mean\_absolute\_percentage\_error
* &#x20;mean\_squared\_logarithmic\_error
* &#x20;squared\_hinge
* &#x20;hinge
* &#x20;categorical\_hinge
* &#x20;logcosh
* &#x20;categorical\_crossentropy
* &#x20;sparse\_categorical\_crossentropy
* &#x20;binary\_crossentropy
* &#x20;kullback\_leibler\_divergence
* &#x20;poisson
* &#x20;cosine\_proximity

The mapping of Keras loss functions can be found in [KerasLossUtils](https://github.com/eclipse/deeplearning4j/blob/master/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/utils/KerasLossUtils.java).
