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

A concatenated ReLU has two outputs, one ReLU and one negative ReLU, concatenated together. More...

Public Member Functions

 CReLU ()
 Create the CReLU object. More...
 
template<typename DataType >
void Backward (const DataType &input, const DataType &gy, DataType &g)
 Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backwards through f. More...
 
OutputDataType const & Delta () const
 Get the delta. More...
 
OutputDataType & Delta ()
 Modify the delta. More...
 
template<typename InputType , typename OutputType >
void Forward (const InputType &input, OutputType &output)
 Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activity forward through f. More...
 
OutputDataType const & OutputParameter () const
 Get the output parameter. More...
 
OutputDataType & OutputParameter ()
 Modify the output 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::CReLU< InputDataType, OutputDataType >

A concatenated ReLU has two outputs, one ReLU and one negative ReLU, concatenated together.

In other words, for positive x it produces [x, 0], and for negative x it produces [0, x]. Because it has two outputs, CReLU doubles the output dimension.

Note: The CReLU doubles the output size.

For more information, see the following.

@inproceedings{ICML2016,
title = {Understanding and Improving Convolutional Neural Networks
via Concatenated Rectified Linear Units},
author = {LWenling Shang, Kihyuk Sohn, Diogo Almeida, Honglak Lee},
year = {2016},
url = {https://arxiv.org/abs/1603.05201}
}
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 50 of file c_relu.hpp.

Constructor & Destructor Documentation

CReLU ( )

Create the CReLU object.

Member Function Documentation

void Backward ( const DataType &  input,
const DataType &  gy,
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 const& Delta ( ) const
inline

Get the delta.

Definition at line 87 of file c_relu.hpp.

OutputDataType& Delta ( )
inline

Modify the delta.

Definition at line 89 of file c_relu.hpp.

void Forward ( const InputType &  input,
OutputType &  output 
)

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

Works only for 2D Tensors.

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

Get the output parameter.

Definition at line 82 of file c_relu.hpp.

OutputDataType& OutputParameter ( )
inline

Modify the output parameter.

Definition at line 84 of file c_relu.hpp.

void serialize ( Archive &  ,
const unsigned  int 
)

Serialize the layer.


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