src/mlpack/tests/activation_functions_test.cpp
void CheckCELUActivationCorrect(const arma::colvec input,
                                const arma::colvec target)
{
  // Initialize CELU object with alpha = 1.0.
  CELU<> lrf(1.0);

  // Test the activation function using the entire vector as input.
  arma::colvec activations;
  lrf.Forward(input, activations);
  for (size_t i = 0; i < activations.n_elem; i++)
  {
    BOOST_REQUIRE_CLOSE(activations.at(i), target.at(i), 1e-3);
  }
}
/**
 * Implementation of the CELU activation function test. The function is
 * implemented as CELU layer in the file celu.hpp.
 *
 * @param input Input data used for evaluating the CELU activation function.
 * @param target Target data used to evaluate the CELU activation.
 */
Implementation of the CELU activation function test. The function is
implemented as CELU layer in the file celu.hpp.

@param input Input data used for evaluating the CELU activation function.
@param target Target data used to evaluate the CELU activation.
Implementation of the CELU activation function test . The function is implemented as CELU layer in the file celu . hpp . @param input Input data used for evaluating the CELU activation function . @param target Target data used to evaluate the CELU activation .
void CheckCELUActivationCorrect(const arma::colvec input,
                                const arma::colvec target)
{
  CELU<> lrf(1.0);
  arma::colvec activations;
  lrf.Forward(input, activations);
  for (size_t i = 0; i < activations.n_elem; i++)
  {
    BOOST_REQUIRE_CLOSE(activations.at(i), target.at(i), 1e-3);
  }
}
void CheckCELUActivationCorrect ( const arma :: colvec input , const arma :: colvec target ) { CELU < > lrf ( 1.0 ) ; arma :: colvec activations ; lrf . Forward ( input , activations ) ; for ( size_t i = 0 ; i < activations . n_elem ; i ++ ) { BOOST_REQUIRE_CLOSE ( activations . at ( i ) , target . at ( i ) , 1e-3 ) ; } }
Implementation of the CELU activation function test.
Implementation of the CELU activation function test .
// Initialize CELU object with alpha = 1.0. // Test the activation function using the entire vector as input.