16 #ifndef MLPACK_METHODS_ANN_LAYER_SOFTSHRINK_HPP    17 #define MLPACK_METHODS_ANN_LAYER_SOFTSHRINK_HPP    47     typename InputDataType = arma::mat,
    48     typename OutputDataType = arma::mat
    74   template<
typename InputType, 
typename OutputType>
    75   void Forward(
const InputType& input, OutputType& output);
    86   template<
typename DataType>
    97   OutputDataType 
const& 
Delta()
 const { 
return delta; }
    99   OutputDataType& 
Delta() { 
return delta; }
   102   double const& 
Lambda()
 const { 
return lambda; }
   109   template<
typename Archive>
   110   void serialize(Archive& ar, 
const uint32_t );
   114   OutputDataType delta;
   117   OutputDataType outputParameter;
   127 #include "softshrink_impl.hpp" OutputDataType & OutputParameter()
Modify the output parameter. 
 
Linear algebra utility functions, generally performed on matrices or vectors. 
 
OutputDataType const  & Delta() const
Get the delta. 
 
The core includes that mlpack expects; standard C++ includes and Armadillo. 
 
double const  & Lambda() const
Get the hyperparameter lambda. 
 
void Forward(const InputType &input, OutputType &output)
Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activ...
 
void serialize(Archive &ar, const uint32_t)
Serialize the layer. 
 
Soft Shrink operator is defined as, . 
 
OutputDataType const  & OutputParameter() const
Get the output parameter. 
 
OutputDataType & Delta()
Modify the delta. 
 
double & Lambda()
Modify the hyperparameter lambda. 
 
void Backward(const DataType &input, DataType &gy, DataType &g)
Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backw...
 
SoftShrink(const double lambda=0.5)
Create Soft Shrink object using specified hyperparameter lambda.