Learn R Programming

keras (version 2.4.0)

loss_binary_crossentropy: Computes the binary crossentropy loss.

Description

Computes the binary crossentropy loss.

Usage

loss_binary_crossentropy(
  y_true,
  y_pred,
  from_logits = FALSE,
  label_smoothing = 0
)

Arguments

y_true

True labels (Tensor)

y_pred

Predictions (Tensor of the same shape as y_true)

from_logits

Whether y_pred is expected to be a logits tensor. By default, we assume that y_pred encodes a probability distribution.

label_smoothing

numeric between 0 and 1. If > 0 then smooth the labels.

See Also

loss_mean_squared_error()