Soft Shrink operator is defined as,
. More...
Public Member Functions | |
SoftShrink (const double lambda=0.5) | |
Create Soft Shrink object using specified hyperparameter lambda. More... | |
template < typename DataType > | |
void | Backward (const DataType &input, 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... | |
double const & | Lambda () const |
Get the hyperparameter lambda. More... | |
double & | Lambda () |
Modify the hyperparameter lambda. 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... | |
Soft Shrink operator is defined as,
.
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 50 of file softshrink.hpp.
SoftShrink | ( | const double | lambda = 0.5 | ) |
Create Soft Shrink object using specified hyperparameter lambda.
lambda | The noise level of an image depends on settings of an imaging device. The settings can be used to select appropriate parameters for denoising methods. It is proportional to the noise level entered by the user. And it is calculated by multiplying the noise level sigma of the input(noisy image) and a coefficient 'a' which is one of the training parameters. Default value of lambda is 0.5. |
void Backward | ( | const DataType & | input, |
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 f(x). |
gy | The backpropagated error. |
g | The calculated gradient |
|
inline |
Get the delta.
Definition at line 97 of file softshrink.hpp.
|
inline |
Modify the delta.
Definition at line 99 of file softshrink.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 Soft Shrink function. |
output | Resulting output activation |
|
inline |
Get the hyperparameter lambda.
Definition at line 102 of file softshrink.hpp.
|
inline |
Modify the hyperparameter lambda.
Definition at line 104 of file softshrink.hpp.
References SoftShrink< InputDataType, OutputDataType >::serialize().
|
inline |
Get the output parameter.
Definition at line 92 of file softshrink.hpp.
|
inline |
Modify the output parameter.
Definition at line 94 of file softshrink.hpp.
void serialize | ( | Archive & | ar, |
const uint32_t | |||
) |
Serialize the layer.
Referenced by SoftShrink< InputDataType, OutputDataType >::Lambda().