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... | |
Implementation of the reinforce normal layer.
The reinforce normal layer implements the REINFORCE algorithm for the normal distribution.
InputDataType | Type of the input data (arma::colvec, arma::mat, arma::sp_mat or arma::cube). |
OutputDataType | Type of the output data (arma::colvec, arma::mat, arma::sp_mat or arma::cube). |
Definition at line 34 of file reinforce_normal.hpp.
ReinforceNormal | ( | const double | stdev = 1.0 | ) |
Create the ReinforceNormal object.
stdev | Standard deviation used during the forward and backward pass. |
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.
input | The propagated input activation. |
* | (gy) The backpropagated error. |
g | The calculated gradient. |
|
inline |
Get the delta.
Definition at line 72 of file reinforce_normal.hpp.
|
inline |
Modify the delta.
Definition at line 74 of file reinforce_normal.hpp.
|
inline |
Get the value of the deterministic parameter.
Definition at line 77 of file reinforce_normal.hpp.
|
inline |
Modify the value of the deterministic parameter.
Definition at line 79 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.
input | Input data used for evaluating the specified function. |
output | Resulting output activation. |
|
inline |
Get the output parameter.
Definition at line 67 of file reinforce_normal.hpp.
|
inline |
Modify the output parameter.
Definition at line 69 of file reinforce_normal.hpp.
|
inline |
Get the value of the reward parameter.
Definition at line 82 of file reinforce_normal.hpp.
|
inline |
Modify the value of the deterministic parameter.
Definition at line 84 of file reinforce_normal.hpp.
void serialize | ( | Archive & | ar, |
const uint32_t | |||
) |
Serialize the layer.
Referenced by ReinforceNormal< InputDataType, OutputDataType >::StandardDeviation().
|
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().