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;
151 #include "nearest_interpolation_impl.hpp" size_t const & OutRowSize() const
Get the row size of the output.
size_t const & InDepth() const
Get the depth of the input.
size_t & InRowSize()
Modify the row size of the input.
Definition and Implementation of the Nearest Interpolation Layer.
Linear algebra utility functions, generally performed on matrices or vectors.
size_t & OutColSize()
Modify the column size of the output.
OutputDataType & Delta()
Modify the delta.
size_t const & OutColSize() const
Get the column size of the output.
The core includes that mlpack expects; standard C++ includes and Armadillo.
OutputDataType const & OutputParameter() const
Get the output parameter.
size_t & OutRowSize()
Modify the row size of the output.
size_t InputShape() const
Get the shape of the input.
void serialize(Archive &ar, const uint32_t)
Serialize the layer.
size_t const & InRowSize() const
Get the row size of the input.
NearestInterpolation()
Create the NearestInterpolation object.
size_t & InDepth()
Modify the depth of the input.
void Forward(const arma::Mat< eT > &input, arma::Mat< eT > &output)
Forward pass through the layer.
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...
OutputDataType const & Delta() const
Get the delta.
size_t & InColSize()
Modify the column size of the input.
size_t const & InColSize() const
Get the column size of the input.
OutputDataType & OutputParameter()
Modify the output parameter.