|
mlpack
master
|
The glimpse layer returns a retina-like representation (down-scaled cropped images) of increasing scale around a given location in a given image. More...
Public Member Functions | |
| Glimpse (const size_t inSize, const size_t size, const size_t depth=3, const size_t scale=2, const size_t inputWidth=0, const size_t inputHeight=0) | |
| Create the GlimpseLayer object using the specified ratio and rescale parameter. More... | |
| template<typename eT > | |
| void | Backward (const arma::Mat< eT > &&, arma::Mat< eT > &&gy, arma::Mat< eT > &&g) |
| Ordinary feed backward pass of the glimpse layer. More... | |
| OutputDataType & | Delta () const |
| Get the detla. 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 glimpse layer. More... | |
| size_t const & | InputHeight () const |
| Get the input height. More... | |
| size_t & | InputHeight () |
| Modify the input height. More... | |
| InputDataType & | InputParameter () const |
| Get the input parameter. More... | |
| InputDataType & | InputParameter () |
| Modify the input parameter. More... | |
| size_t const & | InputWidth () const |
| Get the input width. More... | |
| size_t & | InputWidth () |
| Modify input the width. More... | |
| void | Location (const arma::mat &location) |
| Set the locationthe x and y coordinate of the center of the output glimpse. More... | |
| size_t const & | OutputHeight () const |
| Get the output height. More... | |
| size_t & | OutputHeight () |
| Modify the output height. More... | |
| OutputDataType & | OutputParameter () const |
| Get the output parameter. More... | |
| OutputDataType & | OutputParameter () |
| Modify the output parameter. More... | |
| size_t const & | OutputWidth () const |
| Get the output width. More... | |
| size_t & | OutputWidth () |
| Modify the output width. More... | |
| template<typename Archive > | |
| void | Serialize (Archive &ar, const unsigned int) |
| Serialize the layer. More... | |
Private Member Functions | |
| template<typename eT > | |
| void | DownwardReSampling (const arma::Mat< eT > &input, const arma::Mat< eT > &error, arma::Mat< eT > &output) |
| Apply DownwardReSampling to the input and store the results into the output parameter. More... | |
| template<typename eT > | |
| void | Pooling (const size_t kSize, const arma::Mat< eT > &input, arma::Mat< eT > &output) |
| Apply pooling to the input and store the results to the output parameter. More... | |
| template<typename eT > | |
| void | ReSampling (const arma::Mat< eT > &input, arma::Mat< eT > &output) |
| Apply ReSampling to the input and store the results in the output parameter. More... | |
| void | Transform (arma::mat &w) |
| void | Transform (arma::cube &w) |
| template<typename eT > | |
| void | Unpooling (const arma::Mat< eT > &input, const arma::Mat< eT > &error, arma::Mat< eT > &output) |
| Apply unpooling to the input and store the results. More... | |
Private Attributes | |
| OutputDataType | delta |
| Locally-stored delta object. More... | |
| size_t | depth |
| The number of patches to crop per glimpse. More... | |
| bool | deterministic |
| If true use maximum a posteriori during the forward pass. More... | |
| arma::cube | gTemp |
| Location-stored transformed gradient paramter. More... | |
| size_t | inputDepth |
| Locally-stored depth of the input. More... | |
| size_t | inputHeight |
| Locally-stored input height. More... | |
| InputDataType | inputParameter |
| Locally-stored input parameter object. More... | |
| arma::cube | inputTemp |
| Locally-stored transformed input parameter. More... | |
| size_t | inputWidth |
| Locally-stored input width. More... | |
| size_t | inSize |
| The size of the input units. More... | |
| arma::mat | location |
| The x and y coordinate of the center of the output glimpse. More... | |
| std::vector< arma::mat > | locationParameter |
| Location-stored module location parameter. More... | |
| size_t | outputHeight |
| Locally-stored output height. More... | |
| OutputDataType | outputParameter |
| Locally-stored output parameter object. More... | |
| arma::cube | outputTemp |
| Locally-stored transformed output parameter. More... | |
| size_t | outputWidth |
| Locally-stored output width. More... | |
| MeanPoolingRule | pooling |
| Locally-stored object to perform the mean pooling operation. More... | |
| size_t | scale |
| The scale fraction. More... | |
| size_t | size |
| The used glimpse size (height = width). More... | |
The glimpse layer returns a retina-like representation (down-scaled cropped images) of increasing scale around a given location in a given image.
| 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 82 of file glimpse.hpp.
| mlpack::ann::Glimpse< InputDataType, OutputDataType >::Glimpse | ( | const size_t | inSize, |
| const size_t | size, | ||
| const size_t | depth = 3, |
||
| const size_t | scale = 2, |
||
| const size_t | inputWidth = 0, |
||
| const size_t | inputHeight = 0 |
||
| ) |
Create the GlimpseLayer object using the specified ratio and rescale parameter.
| inSize | The size of the input units. |
| size | The used glimpse size (height = width). |
| depth | The number of patches to crop per glimpse. |
| scale | The scaling factor used to create the increasing retina-like representation. |
| inputWidth | The input width of the given input data. |
| inputHeight | The input height of the given input data. |
| void mlpack::ann::Glimpse< InputDataType, OutputDataType >::Backward | ( | const arma::Mat< eT > && | , |
| arma::Mat< eT > && | gy, | ||
| arma::Mat< eT > && | g | ||
| ) |
Ordinary feed backward pass of the glimpse layer.
| input | The propagated input activation. |
| gy | The backpropagated error. |
| g | The calculated gradient. |
|
inline |
Get the detla.
Definition at line 137 of file glimpse.hpp.
|
inline |
Modify the delta.
Definition at line 139 of file glimpse.hpp.
|
inline |
Get the value of the deterministic parameter.
Definition at line 169 of file glimpse.hpp.
|
inline |
Modify the value of the deterministic parameter.
Definition at line 171 of file glimpse.hpp.
|
inlineprivate |
Apply DownwardReSampling to the input and store the results into the output parameter.
| input | The input to be apply the DownwardReSampling rule. |
| error | The error used to perform the DownwardReSampling operation. |
| output | The DownwardReSampled result. |
Definition at line 324 of file glimpse.hpp.
| void mlpack::ann::Glimpse< InputDataType, OutputDataType >::Forward | ( | const arma::Mat< eT > && | input, |
| arma::Mat< eT > && | output | ||
| ) |
Ordinary feed forward pass of the glimpse layer.
| input | Input data used for evaluating the specified function. |
| output | Resulting output activation. |
|
inline |
Get the input height.
Definition at line 154 of file glimpse.hpp.
|
inline |
Modify the input height.
Definition at line 156 of file glimpse.hpp.
|
inline |
Get the input parameter.
Definition at line 127 of file glimpse.hpp.
|
inline |
Modify the input parameter.
Definition at line 129 of file glimpse.hpp.
|
inline |
Get the input width.
Definition at line 149 of file glimpse.hpp.
|
inline |
Modify input the width.
Definition at line 151 of file glimpse.hpp.
|
inline |
Set the locationthe x and y coordinate of the center of the output glimpse.
Definition at line 143 of file glimpse.hpp.
|
inline |
Get the output height.
Definition at line 164 of file glimpse.hpp.
|
inline |
Modify the output height.
Definition at line 166 of file glimpse.hpp.
|
inline |
Get the output parameter.
Definition at line 132 of file glimpse.hpp.
|
inline |
Modify the output parameter.
Definition at line 134 of file glimpse.hpp.
|
inline |
Get the output width.
Definition at line 159 of file glimpse.hpp.
|
inline |
Modify the output width.
Definition at line 161 of file glimpse.hpp.
|
inlineprivate |
Apply pooling to the input and store the results to the output parameter.
| kSize | the kernel size used to perform the pooling operation. |
| input | The input to be apply the pooling rule. |
| output | The pooled result. |
Definition at line 221 of file glimpse.hpp.
|
inlineprivate |
Apply ReSampling to the input and store the results in the output parameter.
| input | The input to be apply the ReSampling rule. |
| output | The pooled result. |
Definition at line 279 of file glimpse.hpp.
| void mlpack::ann::Glimpse< InputDataType, OutputDataType >::Serialize | ( | Archive & | ar, |
| const unsigned | int | ||
| ) |
Serialize the layer.
|
inlineprivate |
Definition at line 185 of file glimpse.hpp.
|
inlineprivate |
Definition at line 203 of file glimpse.hpp.
|
inlineprivate |
Apply unpooling to the input and store the results.
| input | The input to be apply the unpooling rule. |
| error | The error used to perform the unpooling operation. |
| output | The pooled result. |
Definition at line 247 of file glimpse.hpp.
|
private |
Locally-stored delta object.
Definition at line 391 of file glimpse.hpp.
|
private |
The number of patches to crop per glimpse.
Definition at line 373 of file glimpse.hpp.
|
private |
If true use maximum a posteriori during the forward pass.
Definition at line 421 of file glimpse.hpp.
|
private |
Location-stored transformed gradient paramter.
Definition at line 418 of file glimpse.hpp.
|
private |
Locally-stored depth of the input.
Definition at line 400 of file glimpse.hpp.
|
private |
Locally-stored input height.
Definition at line 382 of file glimpse.hpp.
|
private |
Locally-stored input parameter object.
Definition at line 394 of file glimpse.hpp.
|
private |
Locally-stored transformed input parameter.
Definition at line 403 of file glimpse.hpp.
|
private |
Locally-stored input width.
Definition at line 379 of file glimpse.hpp.
|
private |
The size of the input units.
Definition at line 367 of file glimpse.hpp.
|
private |
The x and y coordinate of the center of the output glimpse.
Definition at line 409 of file glimpse.hpp.
|
private |
Location-stored module location parameter.
Definition at line 415 of file glimpse.hpp.
|
private |
Locally-stored output height.
Definition at line 388 of file glimpse.hpp.
|
private |
Locally-stored output parameter object.
Definition at line 397 of file glimpse.hpp.
|
private |
Locally-stored transformed output parameter.
Definition at line 406 of file glimpse.hpp.
|
private |
Locally-stored output width.
Definition at line 385 of file glimpse.hpp.
|
private |
Locally-stored object to perform the mean pooling operation.
Definition at line 412 of file glimpse.hpp.
|
private |
The scale fraction.
Definition at line 376 of file glimpse.hpp.
|
private |
The used glimpse size (height = width).
Definition at line 370 of file glimpse.hpp.
1.8.11