21.02
|
Basic function to execute direct convolution function. More...
#include <GCDirectConvolutionLayer.h>
Public Member Functions | |
GCDirectConvolutionLayer () | |
Default constructor. More... | |
void | configure (IGCTensor *input, const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output, const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info=ActivationLayerInfo()) |
Set the input and output tensors. More... | |
void | run () override final |
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 direct convolution function.
This function calls the following kernels:
Definition at line 53 of file GCDirectConvolutionLayer.h.
Default constructor.
Definition at line 36 of file GCDirectConvolutionLayer.cpp.
void configure | ( | IGCTensor * | input, |
const IGCTensor * | weights, | ||
const IGCTensor * | biases, | ||
IGCTensor * | output, | ||
const PadStrideInfo & | conv_info, | ||
const ActivationLayerInfo & | act_info = ActivationLayerInfo() |
||
) |
Set the input and output tensors.
[in,out] | 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: F16/F32. input will be written to only if it is currently left aligned. |
[in] | weights | Weights tensor. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM]. Data type supported:Same as input . |
[in] | biases | Biases tensor. Shared biases supported. Biases are 1D tensor with dimensions [OFM]. Data type supported:Same as input . |
[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] | conv_info | Contains padding and stride information described in PadStrideInfo. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. |
Definition at line 41 of file GCDirectConvolutionLayer.cpp.
References ARM_COMPUTE_ERROR, GCFillBorderKernel::configure(), GCTensorShiftKernel::configure(), arm_compute::CONSTANT, ITensorInfo::dimension(), and ITensor::info().
|
finaloverridevirtual |
Run the kernels contained in the function.
For Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 75 of file GCDirectConvolutionLayer.cpp.
References GCScheduler::dispatch(), GCScheduler::get(), and GCScheduler::memory_barrier().