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, const 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...

 
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 &ar, const uint32_t)
 Serialize the layer. More...

 
double StandardDeviation () const
 Get the standard deviation used during forward and backward pass. 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()

ReinforceNormal ( const double  stdev = 1.0)

Create the ReinforceNormal object.

Parameters
stdevStandard deviation used during the forward and backward pass.

Member Function Documentation

◆ Backward()

void Backward ( const DataType &  input,
const 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.
*(gy) The backpropagated error.
gThe calculated gradient.

◆ Delta() [1/2]

OutputDataType& Delta ( ) const
inline

Get the delta.

Definition at line 72 of file reinforce_normal.hpp.

◆ Delta() [2/2]

OutputDataType& Delta ( )
inline

Modify the delta.

Definition at line 74 of file reinforce_normal.hpp.

◆ Deterministic() [1/2]

bool Deterministic ( ) const
inline

Get the value of the deterministic parameter.

Definition at line 77 of file reinforce_normal.hpp.

◆ Deterministic() [2/2]

bool& Deterministic ( )
inline

Modify the value of the deterministic parameter.

Definition at line 79 of file reinforce_normal.hpp.

◆ Forward()

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.

◆ OutputParameter() [1/2]

OutputDataType& OutputParameter ( ) const
inline

Get the output parameter.

Definition at line 67 of file reinforce_normal.hpp.

◆ OutputParameter() [2/2]

OutputDataType& OutputParameter ( )
inline

Modify the output parameter.

Definition at line 69 of file reinforce_normal.hpp.

◆ Reward() [1/2]

double Reward ( ) const
inline

Get the value of the reward parameter.

Definition at line 82 of file reinforce_normal.hpp.

◆ Reward() [2/2]

double& Reward ( )
inline

Modify the value of the deterministic parameter.

Definition at line 84 of file reinforce_normal.hpp.

◆ serialize()

void serialize ( Archive &  ar,
const uint32_t   
)

◆ StandardDeviation()

double StandardDeviation ( ) const
inline

Get the standard deviation used during forward and backward pass.

Definition at line 87 of file reinforce_normal.hpp.

References ReinforceNormal< InputDataType, OutputDataType >::serialize().


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