mlpack  3.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
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 > &, 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 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 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 88 of file glimpse.hpp.

Constructor & Destructor Documentation

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

void 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.
gyThe backpropagated error.
gThe calculated gradient.
OutputDataType& Delta ( ) const
inline

Get the detla.

Definition at line 137 of file glimpse.hpp.

OutputDataType& Delta ( )
inline

Modify the delta.

Definition at line 139 of file glimpse.hpp.

size_t const& Depth ( ) const
inline

Get the number of patches to crop per glimpse.

Definition at line 174 of file glimpse.hpp.

bool Deterministic ( ) const
inline

Get the value of the deterministic parameter.

Definition at line 169 of file glimpse.hpp.

bool& Deterministic ( )
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.

Parameters
inputInput data used for evaluating the specified function.
outputResulting output activation.
size_t GlimpseSize ( ) const
inline

Get the used glimpse size (height = width).

Definition at line 183 of file glimpse.hpp.

size_t const& InputHeight ( ) const
inline

Get the input height.

Definition at line 154 of file glimpse.hpp.

size_t& InputHeight ( )
inline

Modify the input height.

Definition at line 156 of file glimpse.hpp.

size_t const& InputWidth ( ) const
inline

Get the input width.

Definition at line 149 of file glimpse.hpp.

size_t& InputWidth ( )
inline

Modify input the width.

Definition at line 151 of file glimpse.hpp.

size_t InSize ( ) const
inline

Get the size of the input units.

Definition at line 180 of file glimpse.hpp.

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

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

Definition at line 143 of file glimpse.hpp.

size_t const& OutputHeight ( ) const
inline

Get the output height.

Definition at line 164 of file glimpse.hpp.

size_t& OutputHeight ( )
inline

Modify the output height.

Definition at line 166 of file glimpse.hpp.

OutputDataType& OutputParameter ( ) const
inline

Get the output parameter.

Definition at line 132 of file glimpse.hpp.

OutputDataType& OutputParameter ( )
inline

Modify the output parameter.

Definition at line 134 of file glimpse.hpp.

size_t const& OutputWidth ( ) const
inline

Get the output width.

Definition at line 159 of file glimpse.hpp.

size_t& OutputWidth ( )
inline

Modify the output width.

Definition at line 161 of file glimpse.hpp.

size_t const& Scale ( ) const
inline

Get the scale fraction.

Definition at line 177 of file glimpse.hpp.

void serialize ( Archive &  ar,
const unsigned  int 
)

Serialize the layer.


The documentation for this class was generated from the following file: