mlpack  3.0.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
ReinforceNormal< InputDataType, OutputDataType > Class Template Reference

Implementation of the reinforce normal layer. More...

Public Member Functions

 ReinforceNormal (const double stdev=1.0)
 Create the ReinforceNormal object. More...
 
template<typename DataType >
void Backward (const DataType &&input, DataType &&, DataType &&g)
 Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backwards through f. More...
 
OutputDataType & Delta () const
 Get the delta. More...
 
OutputDataType & Delta ()
 Modify the delta. More...
 
bool Deterministic () const
 Get the value of the deterministic parameter. More...
 
bool & Deterministic ()
 Modify the value of the deterministic parameter. More...
 
template<typename eT >
void Forward (const arma::Mat< eT > &&input, arma::Mat< eT > &&output)
 Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activity forward through f. More...
 
InputDataType & InputParameter () const
 Get the input parameter. More...
 
InputDataType & InputParameter ()
 Modify the input parameter. More...
 
OutputDataType & OutputParameter () const
 Get the output parameter. More...
 
OutputDataType & OutputParameter ()
 Modify the output parameter. More...
 
double Reward () const
 Get the value of the reward parameter. More...
 
double & Reward ()
 Modify the value of the deterministic parameter. More...
 
template<typename Archive >
void serialize (Archive &, const unsigned int)
 Serialize the layer. More...
 

Detailed Description

template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
class mlpack::ann::ReinforceNormal< InputDataType, OutputDataType >

Implementation of the reinforce normal layer.

The reinforce normal layer implements the REINFORCE algorithm for the normal distribution.

Template Parameters
InputDataTypeType of the input data (arma::colvec, arma::mat, arma::sp_mat or arma::cube).
OutputDataTypeType of the output data (arma::colvec, arma::mat, arma::sp_mat or arma::cube).

Definition at line 34 of file reinforce_normal.hpp.

Constructor & Destructor Documentation

ReinforceNormal ( const double  stdev = 1.0)

Create the ReinforceNormal object.

Parameters
stdevStandard deviation used during the forward and backward pass.

Member Function Documentation

void Backward ( const DataType &&  input,
DataType &&  ,
DataType &&  g 
)

Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backwards through f.

Using the results from the feed forward pass.

Parameters
inputThe propagated input activation.
gyThe backpropagated error.
gThe calculated gradient.
OutputDataType& Delta ( ) const
inline

Get the delta.

Definition at line 77 of file reinforce_normal.hpp.

OutputDataType& Delta ( )
inline

Modify the delta.

Definition at line 79 of file reinforce_normal.hpp.

bool Deterministic ( ) const
inline

Get the value of the deterministic parameter.

Definition at line 82 of file reinforce_normal.hpp.

bool& Deterministic ( )
inline

Modify the value of the deterministic parameter.

Definition at line 84 of file reinforce_normal.hpp.

void Forward ( const arma::Mat< eT > &&  input,
arma::Mat< eT > &&  output 
)

Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activity forward through f.

Parameters
inputInput data used for evaluating the specified function.
outputResulting output activation.
InputDataType& InputParameter ( ) const
inline

Get the input parameter.

Definition at line 67 of file reinforce_normal.hpp.

InputDataType& InputParameter ( )
inline

Modify the input parameter.

Definition at line 69 of file reinforce_normal.hpp.

OutputDataType& OutputParameter ( ) const
inline

Get the output parameter.

Definition at line 72 of file reinforce_normal.hpp.

OutputDataType& OutputParameter ( )
inline

Modify the output parameter.

Definition at line 74 of file reinforce_normal.hpp.

double Reward ( ) const
inline

Get the value of the reward parameter.

Definition at line 87 of file reinforce_normal.hpp.

double& Reward ( )
inline

Modify the value of the deterministic parameter.

Definition at line 89 of file reinforce_normal.hpp.

void serialize ( Archive &  ,
const unsigned  int 
)

Serialize the layer.


The documentation for this class was generated from the following file: