Add convenience typedefs (ReLULayer, TanHLayer).

This commit is contained in:
marcus
2015-11-12 14:50:18 +01:00
parent 0f4e83dc9c
commit 9d29ede488
@@ -11,6 +11,8 @@
#include <mlpack/core.hpp>
#include <mlpack/methods/ann/activation_functions/logistic_function.hpp>
#include <mlpack/methods/ann/activation_functions/identity_function.hpp>
#include <mlpack/methods/ann/activation_functions/rectifier_function.hpp>
#include <mlpack/methods/ann/activation_functions/tanh_function.hpp>
namespace mlpack {
namespace ann /** Artificial Neural Network. */ {
@@ -23,6 +25,8 @@ namespace ann /** Artificial Neural Network. */ {
*
* - SigmoidLayer
* - IdentityLayer
* - ReLULayer
* - TanHLayer
* - BaseLayer2D
*
* @tparam ActivationFunction Activation function used for the embedding layer.
@@ -165,6 +169,28 @@ template <
using IdentityLayer = BaseLayer<
ActivationFunction, InputDataType, OutputDataType>;
/**
* Standard rectified linear unit non-linearity layer.
*/
template <
class ActivationFunction = RectifierFunction,
typename InputDataType = arma::mat,
typename OutputDataType = arma::mat
>
using ReLULayer = BaseLayer<
ActivationFunction, InputDataType, OutputDataType>;
/**
* Standard hyperbolic tangent layer.
*/
template <
class ActivationFunction = TanhFunction,
typename InputDataType = arma::mat,
typename OutputDataType = arma::mat
>
using TanHLayer = BaseLayer<
ActivationFunction, InputDataType, OutputDataType>;
/**
* Standard Base-Layer2D using the logistic activation function.
*/