Implementation of the SpatialDropout layer. More...
Public Member Functions | |
| SpatialDropout () | |
| Create the SpatialDropout object. More... | |
| SpatialDropout (const size_t size, const double ratio=0.5) | |
| Create the SpatialDropout object using the specified parameters. More... | |
template < typename eT > | |
| void | Backward (const arma::Mat< eT > &input, const arma::Mat< eT > &gy, arma::Mat< eT > &g) |
| Ordinary feed backward pass of the SpatialDropout layer. More... | |
| OutputDataType const & | 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 the SpatialDropout layer. More... | |
| OutputDataType const & | OutputParameter () const |
| Get the output parameter. More... | |
| OutputDataType & | OutputParameter () |
| Modify the output parameter. More... | |
| double | Ratio () const |
| Get the probability value. More... | |
| void | Ratio (const double r) |
| Modify the probability value. More... | |
template < typename Archive > | |
| void | serialize (Archive &ar, const uint32_t) |
| Serialize the layer. More... | |
| size_t | Size () const |
| Get the number of channels. More... | |
| size_t & | Size () |
| Modify the number of channels. More... | |
Implementation of the SpatialDropout layer.
For more information, refer to the following paper,
| 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 48 of file spatial_dropout.hpp.
| SpatialDropout | ( | ) |
Create the SpatialDropout object.
| SpatialDropout | ( | const size_t | size, |
| const double | ratio = 0.5 |
||
| ) |
Create the SpatialDropout object using the specified parameters.
| size | The number of channels of each input image. |
| ratio | The probability of each channel getting dropped. |
| void Backward | ( | const arma::Mat< eT > & | input, |
| const arma::Mat< eT > & | gy, | ||
| arma::Mat< eT > & | g | ||
| ) |
Ordinary feed backward pass of the SpatialDropout layer.
| input | The propagated input activation. |
| gy | The backpropagated error. |
| g | The calculated gradient. |
|
inline |
Get the delta.
Definition at line 88 of file spatial_dropout.hpp.
|
inline |
Modify the delta.
Definition at line 90 of file spatial_dropout.hpp.
|
inline |
Get the value of the deterministic parameter.
Definition at line 99 of file spatial_dropout.hpp.
|
inline |
Modify the value of the deterministic parameter.
Definition at line 101 of file spatial_dropout.hpp.
| void Forward | ( | const arma::Mat< eT > & | input, |
| arma::Mat< eT > & | output | ||
| ) |
Ordinary feed forward pass of the SpatialDropout layer.
| input | Input data used for evaluating the specified function. |
| output | Resulting output activation. |
|
inline |
Get the output parameter.
Definition at line 83 of file spatial_dropout.hpp.
|
inline |
Modify the output parameter.
Definition at line 85 of file spatial_dropout.hpp.
|
inline |
Get the probability value.
Definition at line 104 of file spatial_dropout.hpp.
|
inline |
Modify the probability value.
Definition at line 107 of file spatial_dropout.hpp.
References SpatialDropout< InputDataType, OutputDataType >::serialize().
| void serialize | ( | Archive & | ar, |
| const uint32_t | |||
| ) |
Serialize the layer.
Referenced by SpatialDropout< InputDataType, OutputDataType >::Ratio().
|
inline |
Get the number of channels.
Definition at line 93 of file spatial_dropout.hpp.
|
inline |
Modify the number of channels.
Definition at line 96 of file spatial_dropout.hpp.