src/mlpack/tests/ann_layer_test.cpp
BOOST_AUTO_TEST_CASE(NoAlphaDropoutTest)
{
  arma::mat input = arma::ones(1500, 1);
  AlphaDropout<> module(0);
  module.Deterministic() = false;

  arma::mat output;
  module.Forward(input, output);

  BOOST_REQUIRE_EQUAL(arma::accu(output), arma::accu(input));
}
/**
 * Perform AlphaDropout with probability 1 - p where p = 0,
 * means no AlphaDropout.
 */
Perform AlphaDropout with probability 1 - p where p = 0,
means no AlphaDropout.
Perform AlphaDropout with probability 1 - p where p = 0 means no AlphaDropout .
BOOST_AUTO_TEST_CASE(NoAlphaDropoutTest)
{
  arma::mat input = arma::ones(1500, 1);
  AlphaDropout<> module(0);
  module.Deterministic() = false;
  arma::mat output;
  module.Forward(input, output);
  BOOST_REQUIRE_EQUAL(arma::accu(output), arma::accu(input));
}
BOOST_AUTO_TEST_CASE ( NoAlphaDropoutTest ) { arma :: mat input = arma :: ones ( 1500 , 1 ) ; AlphaDropout < > module ( 0 ) ; module . Deterministic ( ) = false ; arma :: mat output ; module . Forward ( input , output ) ; BOOST_REQUIRE_EQUAL ( arma :: accu ( output ) , arma :: accu ( input ) ) ; }
Perform AlphaDropout with probability 1 - p where p = 0,
 means no AlphaDropout.
Perform AlphaDropout with probability 1 - p where p = 0 means no AlphaDropout .