Glimpse< InputDataType, OutputDataType > Class Template Reference

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 > &&, 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...

 
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...

 

Detailed Description


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
InputDataTypeType of the input data (arma::colvec, arma::mat, arma::sp_mat or arma::cube).
OutputDataTypeType of the output data (arma::colvec, arma::mat, arma::sp_mat or arma::cube).

Definition at line 87 of file glimpse.hpp.

Constructor & Destructor Documentation

◆ Glimpse()

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
inSizeThe size of the input units.
sizeThe used glimpse size (height = width).
depthThe number of patches to crop per glimpse.
scaleThe scaling factor used to create the increasing retina-like representation.
inputWidthThe input width of the given input data.
inputHeightThe input height of the given input data.

Member Function Documentation

◆ Backward()

void Backward ( const arma::Mat< eT > &&  ,
arma::Mat< eT > &&  gy,
arma::Mat< eT > &&  g 
)

Ordinary feed backward pass of the glimpse layer.

Parameters
inputThe propagated input activation.
gyThe backpropagated error.
gThe calculated gradient.

◆ Delta() [1/2]

OutputDataType& Delta ( ) const
inline

Get the detla.

Definition at line 136 of file glimpse.hpp.

◆ Delta() [2/2]

OutputDataType& Delta ( )
inline

Modify the delta.

Definition at line 138 of file glimpse.hpp.

◆ Deterministic() [1/2]

bool Deterministic ( ) const
inline

Get the value of the deterministic parameter.

Definition at line 168 of file glimpse.hpp.

◆ Deterministic() [2/2]

bool& Deterministic ( )
inline

Modify the value of the deterministic parameter.

Definition at line 170 of file glimpse.hpp.

References MeanPoolingRule::Pooling(), and MeanPoolingRule::Unpooling().

◆ Forward()

void Forward ( const arma::Mat< eT > &&  input,
arma::Mat< eT > &&  output 
)

Ordinary feed forward pass of the glimpse layer.

Parameters
inputInput data used for evaluating the specified function.
outputResulting output activation.

◆ InputHeight() [1/2]

size_t const& InputHeight ( ) const
inline

Get the input height.

Definition at line 153 of file glimpse.hpp.

◆ InputHeight() [2/2]

size_t& InputHeight ( )
inline

Modify the input height.

Definition at line 155 of file glimpse.hpp.

◆ InputWidth() [1/2]

size_t const& InputWidth ( ) const
inline

Get the input width.

Definition at line 148 of file glimpse.hpp.

◆ InputWidth() [2/2]

size_t& InputWidth ( )
inline

Modify input the width.

Definition at line 150 of file glimpse.hpp.

◆ Location()

void Location ( const arma::mat &  location)
inline

Set the locationthe x and y coordinate of the center of the output glimpse.

Definition at line 142 of file glimpse.hpp.

◆ OutputHeight() [1/2]

size_t const& OutputHeight ( ) const
inline

Get the output height.

Definition at line 163 of file glimpse.hpp.

◆ OutputHeight() [2/2]

size_t& OutputHeight ( )
inline

Modify the output height.

Definition at line 165 of file glimpse.hpp.

◆ OutputParameter() [1/2]

OutputDataType& OutputParameter ( ) const
inline

Get the output parameter.

Definition at line 131 of file glimpse.hpp.

◆ OutputParameter() [2/2]

OutputDataType& OutputParameter ( )
inline

Modify the output parameter.

Definition at line 133 of file glimpse.hpp.

◆ OutputWidth() [1/2]

size_t const& OutputWidth ( ) const
inline

Get the output width.

Definition at line 158 of file glimpse.hpp.

◆ OutputWidth() [2/2]

size_t& OutputWidth ( )
inline

Modify the output width.

Definition at line 160 of file glimpse.hpp.

◆ serialize()

void serialize ( Archive &  ar,
const unsigned  int 
)

Serialize the layer.


The documentation for this class was generated from the following file:
  • /home/jenkins-mlpack/mlpack.org/_src/mlpack-3.2.1/src/mlpack/methods/ann/layer/glimpse.hpp