10 #ifndef MLPACK_METHODS_ANN_LAYER_NEAREST_INTERPOLATION_HPP 11 #define MLPACK_METHODS_ANN_LAYER_NEAREST_INTERPOLATION_HPP 31 typename InputDataType = arma::mat,
32 typename OutputDataType = arma::mat
50 const size_t inColSize,
51 const size_t outRowSize,
52 const size_t outColSize,
63 void Forward(
const arma::Mat<eT>& input, arma::Mat<eT>& output);
78 const arma::Mat<eT>& gradient,
79 arma::Mat<eT>& output);
87 OutputDataType
const&
Delta()
const {
return delta; }
89 OutputDataType&
Delta() {
return delta; }
92 size_t const&
InRowSize()
const {
return inRowSize; }
97 size_t const&
InColSize()
const {
return inColSize; }
112 size_t const&
InDepth()
const {
return depth; }
125 template<
typename Archive>
126 void serialize(Archive& ar,
const uint32_t );
142 OutputDataType delta;
144 OutputDataType outputParameter;
OutputDataType & OutputParameter()
Modify the output parameter.
Definition: nearest_interpolation.hpp:84
OutputDataType const & Delta() const
Get the delta.
Definition: nearest_interpolation.hpp:87
Definition and Implementation of the Nearest Interpolation Layer.
Definition: nearest_interpolation.hpp:34
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
size_t & InDepth()
Modify the depth of the input.
Definition: nearest_interpolation.hpp:114
void Forward(const arma::Mat< eT > &input, arma::Mat< eT > &output)
Forward pass through the layer.
Definition: nearest_interpolation_impl.hpp:54
The core includes that mlpack expects; standard C++ includes and Armadillo.
void serialize(Archive &ar, const uint32_t)
Serialize the layer.
Definition: nearest_interpolation_impl.hpp:148
size_t & InRowSize()
Modify the row size of the input.
Definition: nearest_interpolation.hpp:94
size_t const & InDepth() const
Get the depth of the input.
Definition: nearest_interpolation.hpp:112
void Backward(const arma::Mat< eT > &, const arma::Mat< eT > &gradient, arma::Mat< eT > &output)
Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backw...
Definition: nearest_interpolation_impl.hpp:96
OutputDataType & Delta()
Modify the delta.
Definition: nearest_interpolation.hpp:89
size_t & OutRowSize()
Modify the row size of the output.
Definition: nearest_interpolation.hpp:104
OutputDataType const & OutputParameter() const
Get the output parameter.
Definition: nearest_interpolation.hpp:82
size_t & OutColSize()
Modify the column size of the output.
Definition: nearest_interpolation.hpp:109
size_t const & InRowSize() const
Get the row size of the input.
Definition: nearest_interpolation.hpp:92
size_t & InColSize()
Modify the column size of the input.
Definition: nearest_interpolation.hpp:99
size_t const & OutColSize() const
Get the column size of the output.
Definition: nearest_interpolation.hpp:107
NearestInterpolation()
Create the NearestInterpolation object.
Definition: nearest_interpolation_impl.hpp:24
size_t const & OutRowSize() const
Get the row size of the output.
Definition: nearest_interpolation.hpp:102
size_t const & InColSize() const
Get the column size of the input.
Definition: nearest_interpolation.hpp:97
size_t InputShape() const
Get the shape of the input.
Definition: nearest_interpolation.hpp:117