Compute Library
18.05
|
Basic function to execute depthwise convolution. More...
#include <CLDepthwiseSeparableConvolutionLayer.h>
Public Member Functions | |
CLDepthwiseSeparableConvolutionLayer () | |
Default constructor. More... | |
void | configure (ICLTensor *input, const ICLTensor *depthwise_weights, const ICLTensor *depthwise_biases, ICLTensor *depthwise_out, const ICLTensor *pointwise_weights, const ICLTensor *pointwise_biases, ICLTensor *output, const PadStrideInfo &depthwise_conv_info, const PadStrideInfo &pointwise_conv_info) |
Set the input and output tensors. More... | |
void | run () override |
Run the kernels contained in the function. More... | |
Public Member Functions inherited from IFunction | |
virtual | ~IFunction ()=default |
Destructor. More... | |
virtual void | prepare () |
Prepare the function for executing. More... | |
Basic function to execute depthwise convolution.
This function calls the following OpenCL kernels and function:
Definition at line 46 of file CLDepthwiseSeparableConvolutionLayer.h.
Default constructor.
void configure | ( | ICLTensor * | input, |
const ICLTensor * | depthwise_weights, | ||
const ICLTensor * | depthwise_biases, | ||
ICLTensor * | depthwise_out, | ||
const ICLTensor * | pointwise_weights, | ||
const ICLTensor * | pointwise_biases, | ||
ICLTensor * | output, | ||
const PadStrideInfo & | depthwise_conv_info, | ||
const PadStrideInfo & | pointwise_conv_info | ||
) |
Set the input and output tensors.
[in] | input | Source tensor. 3 lower dimensions represent a single input [width, height, IFM], while every optional dimension from 4 and above represent a batch of inputs. Data types supported: F32. |
[in] | depthwise_weights | Depthwise convolution weights tensor. These are 3D tensors with dimensions [kernel_x, kernel_y, IFM]. Data type supported: Same as input . |
[in] | depthwise_biases | (Optional) Biases tensor.Biases are 1D tensor with dimensions [IFM]. Must be nullptr if not needed. Data type supported: Same as weights . |
[out] | depthwise_out | Depthwise destination tensor. |
[in] | pointwise_weights | Pointwise convolution weights tensor. These are 4D tensors with dimensions [1, 1, IFM, OFM]. Data type supported: Same as input . |
[in] | pointwise_biases | (Optional) Biases tensor. Biases are 1D tensor with dimensions [OFM]. Must be nullptr if not needed. Data type supported: Same as weights . |
[out] | output | Destination tensor. 3 lower dimensions represent a single output [width, height, OFM], while the rest represent batch of outputs. Data types supported: Same as input . |
[in] | depthwise_conv_info | Contains padding and stride information described in PadStrideInfo for depthwise convolution. |
[in] | pointwise_conv_info | Contains padding and stride information described in PadStrideInfo for pointwise convolution. |
|
overridevirtual |
Run the kernels contained in the function.
For NEON kernels:
For OpenCL kernels:
Implements IFunction.