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=0, const size_t size=0, 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 > &, const 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... | |
size_t const & | Depth () const |
Get the number of patches to crop per glimpse. 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 | GlimpseSize () const |
Get the used glimpse size (height = width). More... | |
size_t const & | InputHeight () const |
Get the input height. More... | |
size_t & | InputHeight () |
Modify the input height. More... | |
size_t | InputShape () const |
Get the shape of the input. More... | |
size_t const & | InputWidth () const |
Get the input width. More... | |
size_t & | InputWidth () |
Modify input the width. More... | |
size_t | InSize () const |
Get the size of the input units. 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... | |
size_t const & | Scale () const |
Get the scale fraction. More... | |
template < typename Archive > | |
void | serialize (Archive &ar, const uint32_t) |
Serialize the layer. 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 88 of file glimpse.hpp.
Glimpse | ( | const size_t | inSize = 0 , |
const size_t | size = 0 , |
||
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 Backward | ( | const arma::Mat< eT > & | , |
const 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 number of patches to crop per glimpse.
Definition at line 174 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.
void 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 used glimpse size (height = width).
Definition at line 183 of file glimpse.hpp.
|
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 shape of the input.
Definition at line 186 of file glimpse.hpp.
References MeanPoolingRule::Pooling(), and MeanPoolingRule::Unpooling().
|
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 |
Get the size of the input units.
Definition at line 180 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.
|
inline |
Get the scale fraction.
Definition at line 177 of file glimpse.hpp.
void serialize | ( | Archive & | ar, |
const uint32_t | |||
) |
Serialize the layer.