The Flatten T Swish activation function, defined by. More...
Public Member Functions | |
FlattenTSwish (const double T=-0.20) | |
Create the Flatten T Swish object using the specified parameters. 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 &ar, const uint32_t) |
Serialize the layer. More... | |
double const & | T () const |
Get the T parameter. More... | |
double & | T () |
Modify the T parameter. More... | |
size_t | WeightSize () const |
Get size of weights. More... | |
The Flatten T Swish activation function, defined by.
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 49 of file flatten_t_swish.hpp.
FlattenTSwish | ( | const double | T = -0.20 | ) |
Create the Flatten T Swish object using the specified parameters.
The thresholded value T can be adjusted via T paramaters. When the x is < 0, T will be used instead of 0. The default value of T is -0.20 as suggested in the paper.
T |
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.
input | The propagated input activation. |
gy | The backpropagated error. |
g | The calculated gradient. |
|
inline |
Get the delta.
Definition at line 89 of file flatten_t_swish.hpp.
|
inline |
Modify the delta.
Definition at line 91 of file flatten_t_swish.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.
input | Input data used for evaluating the specified function. |
output | Resulting output activation. |
|
inline |
Get the output parameter.
Definition at line 84 of file flatten_t_swish.hpp.
|
inline |
Modify the output parameter.
Definition at line 86 of file flatten_t_swish.hpp.
void serialize | ( | Archive & | ar, |
const uint32_t | |||
) |
Serialize the layer.
Referenced by FlattenTSwish< InputDataType, OutputDataType >::WeightSize().
|
inline |
Get the T parameter.
Definition at line 94 of file flatten_t_swish.hpp.
|
inline |
Modify the T parameter.
Definition at line 96 of file flatten_t_swish.hpp.
|
inline |
Get size of weights.
Definition at line 99 of file flatten_t_swish.hpp.
References FlattenTSwish< InputDataType, OutputDataType >::serialize().