ARM Compute Library
17.04
|
NEON kernel to perform reshaping on the weights used by convolution layer. More...
#include <NEConvolutionLayerWeightsReshapeKernel.h>
Public Member Functions | |
NEConvolutionLayerWeightsReshapeKernel () | |
Default constructor. More... | |
NEConvolutionLayerWeightsReshapeKernel (const NEConvolutionLayerWeightsReshapeKernel &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEConvolutionLayerWeightsReshapeKernel & | operator= (const NEConvolutionLayerWeightsReshapeKernel &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEConvolutionLayerWeightsReshapeKernel (NEConvolutionLayerWeightsReshapeKernel &&)=default | |
Allow instances of this class to be moved. More... | |
NEConvolutionLayerWeightsReshapeKernel & | operator= (NEConvolutionLayerWeightsReshapeKernel &&)=default |
Allow instances of this class to be moved. More... | |
~NEConvolutionLayerWeightsReshapeKernel ()=default | |
Default destructor. More... | |
void | configure (const ITensor *input, const ITensor *bias, ITensor *output) |
Set the input and output of the kernel. More... | |
void | run (const Window &window) override |
Execute the kernel on the passed window. More... | |
Public Member Functions inherited from ICPPKernel | |
virtual | ~ICPPKernel ()=default |
Default destructor. More... | |
Public Member Functions inherited from IKernel | |
IKernel () | |
Constructor. More... | |
virtual | ~IKernel ()=default |
Destructor. More... | |
virtual bool | is_parallelisable () const |
Indicates whether or not the kernel is parallelisable. More... | |
virtual BorderSize | border_size () const |
The size of the border for that kernel. More... | |
const Window & | window () const |
The maximum window the kernel can be executed on. More... | |
NEON kernel to perform reshaping on the weights used by convolution layer.
Rearranges each 3-dimensional kernel to a single row leading to a matrix with linearized kernels. In combination with the NEIm2ColKernel can transform a convolution to a matrix multiplication.
For example assuming a 3D weight kernel of 3x3 dimensions and depth of 2 we have:
\[ \left( \begin{array}{ccc} a000 & a001 & a002 \\ a010 & a011 & a012 \\ a020 & a021 & a022 \\ \end{array} \right) \left( \begin{array}{ccc} a100 & a101 & a102 \\ a110 & a111 & a112 \\ a120 & a121 & a122 \\ \end{array} \right) \rightarrow \left( \begin{array}{ccccccccc} a000 & a001 & a002 & a010 & a011 & a012 & a020 & a021 & a022 & a100 & a101 & a102 & a110 & a111 & a112 & a120 & a121 & a122 \\ \end{array} \right) \]
Definition at line 56 of file NEConvolutionLayerWeightsReshapeKernel.h.
Default constructor.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
Allow instances of this class to be moved.
|
default |
Default destructor.
Set the input and output of the kernel.
[in] | input | The input tensor to convert. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM]. Data types supported: F32 |
[in] | bias | The shared bias tensor to append. Biases are 1D tensor with dimensions [OFM]. Data types supported: Same as input |
[out] | output | The output tensor. Should be a 2D Tensor. Data types supported: Same as input |
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Allow instances of this class to be moved.
|
overridevirtual |
Execute the kernel on the passed window.
[in] | window | Region on which to execute the kernel. (Must be a region of the window returned by window()) |
Implements ICPPKernel.