10 #ifndef MLPACK_METHODS_ANN_LAYER_BICUBIC_INTERPOLATION_HPP 11 #define MLPACK_METHODS_ANN_LAYER_BICUBIC_INTERPOLATION_HPP 35 typename InputDataType = arma::mat,
36 typename OutputDataType = arma::mat
54 const size_t inColSize,
55 const size_t outRowSize,
56 const size_t outColSize,
58 const double alpha = -0.75);
68 void Forward(
const arma::Mat<eT>& input, arma::Mat<eT>& output);
83 const arma::Mat<eT>& gradient,
84 arma::Mat<eT>& output);
94 OutputDataType
const&
Delta()
const {
return delta; }
96 OutputDataType&
Delta() {
return delta; }
99 OutputDataType
const&
Parameters()
const {
return weights; }
124 size_t const&
InDepth()
const {
return depth; }
129 double const&
Alpha()
const {
return alpha; }
142 template<
typename Archive>
143 void serialize(Archive& ar,
const uint32_t );
147 typedef typename OutputDataType::elem_type ElemType;
164 OutputDataType delta;
166 OutputDataType outputParameter;
168 OutputDataType weights;
175 #include "bicubic_interpolation_impl.hpp" size_t const & InDepth() const
Get the depth of the input.
Linear algebra utility functions, generally performed on matrices or vectors.
size_t & InColSize()
Modify the column size of the input.
OutputDataType const & OutputParameter() const
Get the output parameter.
OutputDataType & Parameters()
Modify the parameters.
OutputDataType const & Delta() const
Get the delta.
The core includes that mlpack expects; standard C++ includes and Armadillo.
size_t & InRowSize()
Modify the row size of the input.
double & Alpha()
Modify the constant value to generate weight.
OutputDataType const & Parameters() const
Get the parameters.
double const & Alpha() const
Get the constant value to generate weight.
void serialize(Archive &ar, const uint32_t)
Serialize the layer.
size_t const & OutRowSize() const
Get the row size of the output.
size_t & OutRowSize()
Modify the row size of the output.
OutputDataType & Delta()
Modify the delta.
size_t const & OutColSize() const
Get the column size of the output.
Definition and Implementation of the Bicubic Interpolation Layer.
size_t & InDepth()
Modify the depth of the input.
size_t & OutColSize()
Modify the column size of the output.
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...
void GetKernalWeight(double delta, arma::mat &coeffs)
size_t const & InRowSize() const
Get the row size of the input.
OutputDataType & OutputParameter()
Modify the output parameter.
size_t InputShape() const
Get the shape of the input.
BicubicInterpolation()
Create the Bicubic Interpolation object.
void Forward(const arma::Mat< eT > &input, arma::Mat< eT > &output)
Forward pass through the layer.
size_t const & InColSize() const
Get the column size of the input.