Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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


keras

R Interface to 'Keras'

v2.4.0
MIT + file LICENSE
Authors
Daniel Falbel [ctb, cph, cre], JJ Allaire [aut, cph], François Chollet [aut, cph], RStudio [ctb, cph, fnd], Google [ctb, cph, fnd], Yuan Tang [ctb, cph] (<https://orcid.org/0000-0001-5243-233X>), Wouter Van Der Bijl [ctb, cph], Martin Studer [ctb, cph], Sigrid Keydana [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.