13 #ifndef MLPACK_METHODS_ANN_LAYER_PIXEL_SHUFFLE_HPP 14 #define MLPACK_METHODS_ANN_LAYER_PIXEL_SHUFFLE_HPP 46 typename InputDataType = arma::mat,
47 typename OutputDataType = arma::mat
77 void Forward(
const arma::Mat<eT>& input, arma::Mat<eT>& output);
87 void Backward(
const arma::Mat<eT>& input,
88 const arma::Mat<eT>& gy,
97 OutputDataType
const&
Delta()
const {
return delta; }
99 OutputDataType&
Delta() {
return delta; }
137 template<
typename Archive>
138 void serialize(Archive& ar,
const unsigned int );
142 OutputDataType delta;
145 OutputDataType outputParameter;
148 size_t upscaleFactor;
void Backward(const arma::Mat< eT > &input, const arma::Mat< eT > &gy, arma::Mat< eT > &g)
Ordinary feed backward pass of the PixelShuffle layer.
Definition: pixel_shuffle_impl.hpp:90
void serialize(Archive &ar, const unsigned int)
Serialize the layer.
Definition: pixel_shuffle_impl.hpp:121
size_t & InputWidth()
Modify the input image width.
Definition: pixel_shuffle.hpp:117
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
size_t InputWidth() const
Get the input image width.
Definition: pixel_shuffle.hpp:114
The core includes that mlpack expects; standard C++ includes and Armadillo.
void Forward(const arma::Mat< eT > &input, arma::Mat< eT > &output)
Ordinary feed forward pass of the PixelShuffle layer.
Definition: pixel_shuffle_impl.hpp:50
size_t & InputChannels()
Modify the number of input channels.
Definition: pixel_shuffle.hpp:123
size_t OutputWidth() const
Get the output image width.
Definition: pixel_shuffle.hpp:129
OutputDataType & OutputParameter()
Modify the output parameter.
Definition: pixel_shuffle.hpp:94
Implementation of the PixelShuffle layer.
Definition: pixel_shuffle.hpp:49
size_t UpscaleFactor() const
Get the upscale factor.
Definition: pixel_shuffle.hpp:102
size_t InputChannels() const
Get the number of input channels.
Definition: pixel_shuffle.hpp:120
size_t OutputHeight() const
Get the output image height.
Definition: pixel_shuffle.hpp:126
OutputDataType const & OutputParameter() const
Get the output parameter.
Definition: pixel_shuffle.hpp:92
size_t & UpscaleFactor()
Modify the upscale factor.
Definition: pixel_shuffle.hpp:105
size_t & InputHeight()
Modify the input image height.
Definition: pixel_shuffle.hpp:111
size_t OutputChannels() const
Get the number of output channels.
Definition: pixel_shuffle.hpp:132
size_t InputHeight() const
Get the input image height.
Definition: pixel_shuffle.hpp:108
OutputDataType const & Delta() const
Get the delta.
Definition: pixel_shuffle.hpp:97
OutputDataType & Delta()
Modify the delta.
Definition: pixel_shuffle.hpp:99
PixelShuffle()
Create the PixelShuffle object.
Definition: pixel_shuffle_impl.hpp:23