The glimpse layer returns a retina-like representation (down-scaled cropped images) of increasing scale around a given location in a given image.
More...
#include <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. More...
|
| |
| template<typename eT > |
| void | Forward (const arma::Mat< eT > &input, arma::Mat< eT > &output) |
| | Ordinary feed forward pass of the glimpse layer. 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 & | OutputParameter () const |
| | Get the output parameter.
|
| |
|
OutputDataType & | OutputParameter () |
| | Modify the output parameter.
|
| |
|
OutputDataType & | Delta () const |
| | Get the detla.
|
| |
|
OutputDataType & | Delta () |
| | Modify the delta.
|
| |
| void | Location (const arma::mat &location) |
| | Set the locationthe x and y coordinate of the center of the output glimpse. More...
|
| |
|
size_t const & | InputWidth () const |
| | Get the input width.
|
| |
|
size_t & | InputWidth () |
| | Modify input the width.
|
| |
|
size_t const & | InputHeight () const |
| | Get the input height.
|
| |
|
size_t & | InputHeight () |
| | Modify the input height.
|
| |
|
size_t const & | OutputWidth () const |
| | Get the output width.
|
| |
|
size_t & | OutputWidth () |
| | Modify the output width.
|
| |
|
size_t const & | OutputHeight () const |
| | Get the output height.
|
| |
|
size_t & | OutputHeight () |
| | Modify the output height.
|
| |
|
bool | Deterministic () const |
| | Get the value of the deterministic parameter.
|
| |
|
bool & | Deterministic () |
| | Modify the value of the deterministic parameter.
|
| |
|
size_t const & | Depth () const |
| | Get the number of patches to crop per glimpse.
|
| |
|
size_t const & | Scale () const |
| | Get the scale fraction.
|
| |
|
size_t | InSize () const |
| | Get the size of the input units.
|
| |
|
size_t | GlimpseSize () const |
| | Get the used glimpse size (height = width).
|
| |
|
size_t | InputShape () const |
| | Get the shape of the input.
|
| |
|
template<typename Archive > |
| void | serialize (Archive &ar, const uint32_t) |
| | Serialize the layer.
|
| |
template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
class mlpack::ann::Glimpse< InputDataType, OutputDataType >
The glimpse layer returns a retina-like representation (down-scaled cropped images) of increasing scale around a given location in a given image.
- Template Parameters
-
| 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). |
◆ Glimpse()
template<typename InputDataType , typename OutputDataType >
| mlpack::ann::Glimpse< InputDataType, OutputDataType >::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.
- Parameters
-
| 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. |
◆ Backward()
template<typename InputDataType , typename OutputDataType >
template<typename eT >
| void mlpack::ann::Glimpse< InputDataType, OutputDataType >::Backward |
( |
const arma::Mat< eT > & |
, |
|
|
const arma::Mat< eT > & |
gy, |
|
|
arma::Mat< eT > & |
g |
|
) |
| |
Ordinary feed backward pass of the glimpse layer.
- Parameters
-
| * | (input) The propagated input activation. |
| gy | The backpropagated error. |
| g | The calculated gradient. |
◆ Forward()
template<typename InputDataType , typename OutputDataType >
template<typename eT >
| void mlpack::ann::Glimpse< InputDataType, OutputDataType >::Forward |
( |
const arma::Mat< eT > & |
input, |
|
|
arma::Mat< eT > & |
output |
|
) |
| |
Ordinary feed forward pass of the glimpse layer.
- Parameters
-
| input | Input data used for evaluating the specified function. |
| output | Resulting output activation. |
◆ Location()
template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
Set the locationthe x and y coordinate of the center of the output glimpse.
The documentation for this class was generated from the following files: