|
| Highway () |
| Create the Highway object.
|
|
| Highway (const size_t inSize, const bool model=true) |
| Create the Highway object. More...
|
|
| ~Highway () |
| Destroy the Highway object.
|
|
void | Reset () |
| Reset the layer parameter.
|
|
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...
|
|
template<typename eT > |
void | Backward (const arma::Mat< eT > &, const arma::Mat< eT > &gy, arma::Mat< eT > &g) |
| Ordinary feed-backward pass of a neural network, calculating the function f(x) by propagating x backwards through f. More...
|
|
template<typename eT > |
void | Gradient (const arma::Mat< eT > &input, const arma::Mat< eT > &error, arma::Mat< eT > &gradient) |
| Calculate the gradient using the output delta and the input activation. More...
|
|
template<class LayerType , class... Args> |
void | Add (Args... args) |
| Add a new module to the model. More...
|
|
void | Add (LayerTypes< CustomLayers... > layer) |
| Add a new module to the model. More...
|
|
std::vector< LayerTypes< CustomLayers... > > & | Model () |
| Return the modules of the model.
|
|
OutputDataType const & | Parameters () const |
| Get the parameters.
|
|
OutputDataType & | Parameters () |
| Modify the parameters.
|
|
InputDataType const & | InputParameter () const |
| Get the input parameter.
|
|
InputDataType & | InputParameter () |
| Modify the input parameter.
|
|
OutputDataType const & | OutputParameter () const |
| Get the output parameter.
|
|
OutputDataType & | OutputParameter () |
| Modify the output parameter.
|
|
OutputDataType const & | Delta () const |
| Get the delta.
|
|
OutputDataType & | Delta () |
| Modify the delta.
|
|
OutputDataType const & | Gradient () const |
| Get the gradient.
|
|
OutputDataType & | Gradient () |
| Modify the gradient.
|
|
size_t | InSize () const |
| Get the number of input units.
|
|
size_t | InputShape () const |
| Get the shape of the input.
|
|
template<typename Archive > |
void | serialize (Archive &ar, const uint32_t) |
| Serialize the layer.
|
|
template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat, typename... CustomLayers>
class mlpack::ann::Highway< InputDataType, OutputDataType, CustomLayers >
Implementation of the Highway layer.
The Highway class can vary its behavior between that of feed-forward fully connected network container and that of a layer which simply passes its inputs through depending on the transform gate. Note that the size of the input and output matrices of this class should be equal.
For more information, refer the following paper.
@article{Srivastava2015,
author = {Rupesh Kumar Srivastava, Klaus Greff, Jurgen Schmidhuber},
title = {Training Very Deep Networks},
journal = {Advances in Neural Information Processing Systems},
year = {2015},
url = {https:
}
- Template Parameters
-
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). |
template<typename InputDataType , typename OutputDataType , typename... CustomLayers>
template<typename eT >
void mlpack::ann::Highway< InputDataType, OutputDataType, CustomLayers >::Backward |
( |
const arma::Mat< eT > & |
, |
|
|
const arma::Mat< eT > & |
gy, |
|
|
arma::Mat< eT > & |
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
-
* | (input) The propagated input activation. |
gy | The backpropagated error. |
g | The calculated gradient. |