View source: R/cross_entropy_loss.R
| cross_entropy_loss | R Documentation | 
Computes cross entropy loss.
cross_entropy_loss(predictions, targets, epsilon = 1e-12, log_epsilon = 1e-10)
| predictions | one-hot encoded proba matrix (with (n,k)). | 
| targets | one-hot encoded matrix (with (n,k)). | 
| epsilon | clipping offset. | 
| log_epsilon | log offset. | 
numeric loss.
## Not run: 
cross_entropy_loss(matrix(c(0.25,0.01,0.25,0.01,0.25,0.01,0.25,0.96), nrow = 2),
                   matrix(c(0,0,0,0,0,0,1,1), nrow=2))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.