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;
179 #include "pixel_shuffle_impl.hpp" size_t OutputHeight() const
Get the output image height.
size_t InputChannels() const
Get the number of input channels.
size_t OutputChannels() const
Get the number of output channels.
Linear algebra utility functions, generally performed on matrices or vectors.
void serialize(Archive &ar, const unsigned int)
Serialize the layer.
The core includes that mlpack expects; standard C++ includes and Armadillo.
size_t UpscaleFactor() const
Get the upscale factor.
void Backward(const arma::Mat< eT > &input, const arma::Mat< eT > &gy, arma::Mat< eT > &g)
Ordinary feed backward pass of the PixelShuffle layer.
size_t & UpscaleFactor()
Modify the upscale factor.
OutputDataType const & OutputParameter() const
Get the output parameter.
Implementation of the PixelShuffle layer.
OutputDataType const & Delta() const
Get the delta.
size_t & InputWidth()
Modify the input image width.
size_t InputWidth() const
Get the input image width.
size_t & InputHeight()
Modify the input image height.
size_t InputHeight() const
Get the input image height.
void Forward(const arma::Mat< eT > &input, arma::Mat< eT > &output)
Ordinary feed forward pass of the PixelShuffle layer.
size_t OutputWidth() const
Get the output image width.
OutputDataType & Delta()
Modify the delta.
OutputDataType & OutputParameter()
Modify the output parameter.
size_t & InputChannels()
Modify the number of input channels.
PixelShuffle()
Create the PixelShuffle object.