10 #ifndef MLPACK_METHODS_ANN_LAYER_CHANNEL_SHUFFLE_HPP 11 #define MLPACK_METHODS_ANN_LAYER_CHANNEL_SHUFFLE_HPP 43 typename InputDataType = arma::mat,
44 typename OutputDataType = arma::mat
61 const size_t inColSize,
63 const size_t groupCount);
72 void Forward(
const arma::Mat<eT>& input, arma::Mat<eT>& output);
87 const arma::Mat<eT>& gradient,
88 arma::Mat<eT>& output);
96 OutputDataType
const&
Delta()
const {
return delta; }
98 OutputDataType&
Delta() {
return delta; }
111 size_t const&
InDepth()
const {
return depth; }
129 template<
typename Archive>
130 void serialize(Archive& ar,
const uint32_t );
144 OutputDataType delta;
146 OutputDataType outputParameter;
153 #include "channel_shuffle_impl.hpp" Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
size_t InputShape() const
Get the shape of the input.
Definition: channel_shuffle.hpp:121
The core includes that mlpack expects; standard C++ includes and Armadillo.
OutputDataType & Delta()
Modify the delta.
Definition: channel_shuffle.hpp:98
size_t & InColSize()
Modify the column size of the input.
Definition: channel_shuffle.hpp:108
OutputDataType & OutputParameter()
Modify the output parameter.
Definition: channel_shuffle.hpp:93
size_t const & InDepth() const
Get the depth of the input.
Definition: channel_shuffle.hpp:111
void Forward(const arma::Mat< eT > &input, arma::Mat< eT > &output)
Forward pass through the layer.
Definition: channel_shuffle_impl.hpp:55
ChannelShuffle()
Create the Channel Shuffle object.
Definition: channel_shuffle_impl.hpp:24
size_t & InRowSize()
Modify the row size of the input.
Definition: channel_shuffle.hpp:103
void serialize(Archive &ar, const uint32_t)
Serialize the layer.
Definition: channel_shuffle_impl.hpp:126
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: channel_shuffle_impl.hpp:90
size_t const & InRowSize() const
Get the row size of the input.
Definition: channel_shuffle.hpp:101
size_t const & InGroupCount() const
Get the number of groups the channels is divided into.
Definition: channel_shuffle.hpp:116
Definition and implementation of the Channel Shuffle Layer.
Definition: channel_shuffle.hpp:46
OutputDataType const & Delta() const
Get the delta.
Definition: channel_shuffle.hpp:96
size_t const & InColSize() const
Get the column size of the input.
Definition: channel_shuffle.hpp:106
OutputDataType const & OutputParameter() const
Get the output parameter.
Definition: channel_shuffle.hpp:91
size_t & InGroupCount()
Modify the number of groups the channels is divided into.
Definition: channel_shuffle.hpp:118
size_t & InDepth()
Modify the depth of the input.
Definition: channel_shuffle.hpp:113