ivy.neural_net_functional.losses.binary_cross_entropy(x, y, epsilon=1e-07, f=None)[source]

Computes the cross-entropy loss between true labels and predicted labels.

  • x (array) – Predicted labels

  • y (array) – true labels

  • epsilon (constant) – small constant to add to log functions

  • f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.


The binary cross entropy loss array.

Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty