| loss_crossentropy | R Documentation |
Creates a categorical cross-entropy loss function object.
loss_crossentropy(epsilon = 1e-15)
epsilon |
A small positive numeric value used for numerical stability. |
An object of class "met_loss".
Bridle, J. S. (1990). Probabilistic Interpretation of Feedforward Classification Network Outputs, with Relationships to Statistical Pattern Recognition. In Neurocomputing: Algorithms, Architectures and Applications, 227–236. Springer.
loss <- loss_crossentropy()
y_true <- matrix(c(1, 0, 0, 0, 1, 0), nrow = 2, byrow = TRUE)
y_pred <- matrix(c(0.8, 0.1, 0.1, 0.2, 0.7, 0.1), nrow = 2, byrow = TRUE)
loss$fn(y_true, y_pred)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.