Implementation of the Atrous Convolution class. More...
Public Member Functions | |
AtrousConvolution () | |
Create the AtrousConvolution object. More... | |
AtrousConvolution (const size_t inSize, const size_t outSize, const size_t kW, const size_t kH, const size_t dW=1, const size_t dH=1, const size_t padW=0, const size_t padH=0, const size_t inputWidth=0, const size_t inputHeight=0, const size_t dilationW=1, const size_t dilationH=1) | |
Create the AtrousConvolution object using the specified number of input maps, output maps, filter size, stride, dilation and padding parameter. More... | |
template < typename eT > | |
void | Backward (const arma::Mat< eT > &&, arma::Mat< eT > &&gy, arma::Mat< eT > &&g) |
Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backwards through f. More... | |
arma::mat & | Bias () |
Modify the bias weights of the layer. More... | |
OutputDataType const & | Delta () const |
Get the delta. More... | |
OutputDataType & | Delta () |
Modify the delta. More... | |
template < typename eT > | |
void | Forward (const arma::Mat< eT > &&input, arma::Mat< eT > &&output) |
Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activity forward through f. More... | |
template < typename eT > | |
void | Gradient (const arma::Mat< eT > &&, arma::Mat< eT > &&error, arma::Mat< eT > &&gradient) |
OutputDataType const & | Gradient () const |
Get the gradient. More... | |
OutputDataType & | Gradient () |
Modify the gradient. More... | |
size_t const & | InputHeight () const |
Get the input height. More... | |
size_t & | InputHeight () |
Modify the input height. More... | |
size_t const & | InputWidth () const |
Get the input width. More... | |
size_t & | InputWidth () |
Modify input the width. More... | |
size_t const & | OutputHeight () const |
Get the output height. More... | |
size_t & | OutputHeight () |
Modify the output height. More... | |
OutputDataType const & | OutputParameter () const |
Get the output parameter. More... | |
OutputDataType & | OutputParameter () |
Modify the output parameter. More... | |
size_t const & | OutputWidth () const |
Get the output width. More... | |
size_t & | OutputWidth () |
Modify the output width. More... | |
OutputDataType const & | Parameters () const |
Get the parameters. More... | |
OutputDataType & | Parameters () |
Modify the parameters. More... | |
void | Reset () |
template < typename Archive > | |
void | serialize (Archive &ar, const unsigned int) |
Serialize the layer. More... | |
Implementation of the Atrous Convolution class.
The Atrous Convolution class represents a single layer of a neural network. Atrous (or Dilated) Convolutions are just simple convolutions applied to input with the defined, spaces included between the kernel cells, in order to capture a larger field of reception, without having to increase dicrete kernel sizes.
ForwardConvolutionRule | Atrous Convolution to perform forward process. |
BackwardConvolutionRule | Atrous Convolution to perform backward process. |
GradientConvolutionRule | Atrous Convolution to calculate gradient. |
InputDataType | Type of the input data (arma::colvec, arma::mat, arma::sp_mat or arma::cube). |
OutputDataType | Type of the output data (arma::colvec, arma::mat, arma::sp_mat or arma::cube). |
Definition at line 51 of file atrous_convolution.hpp.
Create the AtrousConvolution object.
AtrousConvolution | ( | const size_t | inSize, |
const size_t | outSize, | ||
const size_t | kW, | ||
const size_t | kH, | ||
const size_t | dW = 1 , |
||
const size_t | dH = 1 , |
||
const size_t | padW = 0 , |
||
const size_t | padH = 0 , |
||
const size_t | inputWidth = 0 , |
||
const size_t | inputHeight = 0 , |
||
const size_t | dilationW = 1 , |
||
const size_t | dilationH = 1 |
||
) |
Create the AtrousConvolution object using the specified number of input maps, output maps, filter size, stride, dilation and padding parameter.
inSize | The number of input maps. |
outSize | The number of output maps. |
kW | Width of the filter/kernel. |
kH | Height of the filter/kernel. |
dW | Stride of filter application in the x direction. |
dH | Stride of filter application in the y direction. |
padW | Padding width of the input. |
padH | Padding height of the input. |
inputWidth | The widht of the input data. |
inputHeight | The height of the input data. |
dilationW | The space between the cells of filters in x direction. |
dilationH | The space between the cells of filters in y direction. |
void Backward | ( | const arma::Mat< eT > && | , |
arma::Mat< eT > && | gy, | ||
arma::Mat< eT > && | g | ||
) |
Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backwards through f.
Using the results from the feed forward pass.
input | The propagated input activation. |
gy | The backpropagated error. |
g | The calculated gradient. |
|
inline |
Modify the bias weights of the layer.
Definition at line 170 of file atrous_convolution.hpp.
|
inline |
Get the delta.
Definition at line 140 of file atrous_convolution.hpp.
|
inline |
Modify the delta.
Definition at line 142 of file atrous_convolution.hpp.
void Forward | ( | const arma::Mat< eT > && | input, |
arma::Mat< eT > && | output | ||
) |
Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activity forward through f.
input | Input data used for evaluating the specified function. |
output | Resulting output activation. |
void Gradient | ( | const arma::Mat< eT > && | , |
arma::Mat< eT > && | error, | ||
arma::Mat< eT > && | gradient | ||
) |
|
inline |
Get the gradient.
Definition at line 145 of file atrous_convolution.hpp.
|
inline |
Modify the gradient.
Definition at line 147 of file atrous_convolution.hpp.
|
inline |
Get the input height.
Definition at line 155 of file atrous_convolution.hpp.
|
inline |
Modify the input height.
Definition at line 157 of file atrous_convolution.hpp.
|
inline |
Get the input width.
Definition at line 150 of file atrous_convolution.hpp.
|
inline |
Modify input the width.
Definition at line 152 of file atrous_convolution.hpp.
|
inline |
Get the output height.
Definition at line 165 of file atrous_convolution.hpp.
|
inline |
Modify the output height.
Definition at line 167 of file atrous_convolution.hpp.
|
inline |
Get the output parameter.
Definition at line 135 of file atrous_convolution.hpp.
|
inline |
Modify the output parameter.
Definition at line 137 of file atrous_convolution.hpp.
|
inline |
Get the output width.
Definition at line 160 of file atrous_convolution.hpp.
|
inline |
Modify the output width.
Definition at line 162 of file atrous_convolution.hpp.
|
inline |
Get the parameters.
Definition at line 130 of file atrous_convolution.hpp.
|
inline |
Modify the parameters.
Definition at line 132 of file atrous_convolution.hpp.
void Reset | ( | ) |
void serialize | ( | Archive & | ar, |
const unsigned | int | ||
) |
Serialize the layer.
Referenced by AtrousConvolution< ForwardConvolutionRule, BackwardConvolutionRule, GradientConvolutionRule, InputDataType, OutputDataType >::Bias().