Expression Templates Library (ETL)
Functions
cce.hpp File Reference

Standard implementation of the Categorical Cross Entropy reduction. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename O , typename L >
value_t< O > etl::impl::standard::cce_loss (const O &output, const L &labels, value_t< O > scale)
 Compute the Categorical Cross Entropy loss of the input in the given expression. More...
 
template<typename O , typename L >
value_t< O > etl::impl::standard::cce_error (const O &output, const L &labels, value_t< O > scale)
 Compute the Categorical Cross Entropy error of the input in the given expression. More...
 
template<typename O , typename L >
std::pair< value_t< O >, value_t< O > > etl::impl::standard::cce (const O &output, const L &labels, value_t< O > alpha, value_t< O > beta)
 Returns the Binary Cross Entropy Loss and Error. More...
 

Detailed Description

Standard implementation of the Categorical Cross Entropy reduction.

Function Documentation

◆ cce()

template<typename O , typename L >
std::pair<value_t<O>, value_t<O> > etl::impl::standard::cce ( const O &  output,
const L &  labels,
value_t< O >  alpha,
value_t< O >  beta 
)

Returns the Binary Cross Entropy Loss and Error.

Parameters
outputThe outputs
labelsThe labels
Returns
The CCE Error of the output and labels

◆ cce_error()

template<typename O , typename L >
value_t<O> etl::impl::standard::cce_error ( const O &  output,
const L &  labels,
value_t< O >  scale 
)

Compute the Categorical Cross Entropy error of the input in the given expression.

Parameters
inputThe input expression
Returns
the sum

◆ cce_loss()

template<typename O , typename L >
value_t<O> etl::impl::standard::cce_loss ( const O &  output,
const L &  labels,
value_t< O >  scale 
)

Compute the Categorical Cross Entropy loss of the input in the given expression.

Parameters
inputThe input expression
Returns
the sum