src/mlpack/tests/ann_layer_test.cpp
BOOST_AUTO_TEST_CASE(FastLSTMLayerParametersTest)
{
  // Parameter order : inSize, outSize, rho.
  FastLSTM<> layer1(1, 2, 3);
  FastLSTM<> layer2(1, 2, 4);

  // Make sure we can get the parameters successfully.
  BOOST_REQUIRE_EQUAL(layer1.InSize(), 1);
  BOOST_REQUIRE_EQUAL(layer1.OutSize(), 2);
  BOOST_REQUIRE_EQUAL(layer1.Rho(), 3);

  // Now modify the parameters to match the second layer.
  layer1.Rho() = 4;

  // Now ensure all the results are the same.
  BOOST_REQUIRE_EQUAL(layer1.InSize(), layer2.InSize());
  BOOST_REQUIRE_EQUAL(layer2.OutSize(), layer2.OutSize());
  BOOST_REQUIRE_EQUAL(layer1.Rho(), layer2.Rho());
}
/**
 * Test that the functions that can modify and access the parameters of the
 * Fast LSTM layer work.
 */
Test that the functions that can modify and access the parameters of the
Fast LSTM layer work.
Test that the functions that can modify and access the parameters of the Fast LSTM layer work .
BOOST_AUTO_TEST_CASE(FastLSTMLayerParametersTest)
{
  FastLSTM<> layer1(1, 2, 3);
  FastLSTM<> layer2(1, 2, 4);
  BOOST_REQUIRE_EQUAL(layer1.InSize(), 1);
  BOOST_REQUIRE_EQUAL(layer1.OutSize(), 2);
  BOOST_REQUIRE_EQUAL(layer1.Rho(), 3);
  layer1.Rho() = 4;
  BOOST_REQUIRE_EQUAL(layer1.InSize(), layer2.InSize());
  BOOST_REQUIRE_EQUAL(layer2.OutSize(), layer2.OutSize());
  BOOST_REQUIRE_EQUAL(layer1.Rho(), layer2.Rho());
}
BOOST_AUTO_TEST_CASE ( FastLSTMLayerParametersTest ) { FastLSTM < > layer1 ( 1 , 2 , 3 ) ; FastLSTM < > layer2 ( 1 , 2 , 4 ) ; BOOST_REQUIRE_EQUAL ( layer1 . InSize ( ) , 1 ) ; BOOST_REQUIRE_EQUAL ( layer1 . OutSize ( ) , 2 ) ; BOOST_REQUIRE_EQUAL ( layer1 . Rho ( ) , 3 ) ; layer1 . Rho ( ) = 4 ; BOOST_REQUIRE_EQUAL ( layer1 . InSize ( ) , layer2 . InSize ( ) ) ; BOOST_REQUIRE_EQUAL ( layer2 . OutSize ( ) , layer2 . OutSize ( ) ) ; BOOST_REQUIRE_EQUAL ( layer1 . Rho ( ) , layer2 . Rho ( ) ) ; }
Test that the functions that can modify and access the parameters of the
 Fast LSTM layer work.
Test that the functions that can modify and access the parameters of the Fast LSTM layer work .
// Parameter order : inSize, outSize, rho. // Make sure we can get the parameters successfully. // Now modify the parameters to match the second layer. // Now ensure all the results are the same.