21.02
|
Basic function to compute the deconvolution layer. More...
#include <CLDeconvolutionLayer.h>
Public Member Functions | |
CLDeconvolutionLayer (std::shared_ptr< IMemoryManager > memory_manager=nullptr) | |
Default constructor. More... | |
void | configure (ICLTensor *input, ICLTensor *weights, const ICLTensor *bias, ICLTensor *output, const PadStrideInfo &deconv_info, const WeightsInfo &weights_info=WeightsInfo()) |
Set the input, weights, biases and output tensors. More... | |
void | configure (const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *weights, const ICLTensor *bias, ICLTensor *output, const PadStrideInfo &deconv_info, const WeightsInfo &weights_info=WeightsInfo()) |
Set the input, weights, biases and output tensors. More... | |
void | run () override |
Run the kernels contained in the function. More... | |
void | prepare () override |
Prepare the function for executing. More... | |
Public Member Functions inherited from IFunction | |
virtual | ~IFunction ()=default |
Destructor. More... | |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *bias, ITensorInfo *output, const PadStrideInfo &deconv_info, const WeightsInfo &weights_info=WeightsInfo()) |
Static function to check if given info will lead to a valid configuration of CLDeconvolutionLayer. More... | |
static DeconvolutionMethod | get_deconvolution_method (const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *bias, ITensorInfo *output, const PadStrideInfo &deconv_info, const WeightsInfo &weights_info) |
Basic function to compute the deconvolution layer.
This function calls the following OpenCL kernels/functions:
Definition at line 41 of file CLDeconvolutionLayer.h.
CLDeconvolutionLayer | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr | ) |
Default constructor.
Definition at line 39 of file CLDeconvolutionLayer.cpp.
void configure | ( | ICLTensor * | input, |
ICLTensor * | weights, | ||
const ICLTensor * | bias, | ||
ICLTensor * | output, | ||
const PadStrideInfo & | deconv_info, | ||
const WeightsInfo & | weights_info = WeightsInfo() |
||
) |
Set the input, weights, biases and output tensors.
[in,out] | input | Input tensor. 3 lower dimensions represent a single input, and an optional 4th dimension for batch of inputs. Data types supported: QASYMM8_SIGNED/QASYMM8/F16/F32. |
[in] | weights | The 4d weights with dimensions [width, height, IFM, OFM]. Data type supported: Same as input . |
[in] | bias | (Optional) The biases have one dimension. Data type supported: Same as input . |
[out] | output | Output tensor. The output has the same number of dimensions as the input . |
[in] | deconv_info | Contains padding and policies to be used in the deconvolution, this is described in PadStrideInfo. |
[in] | weights_info | (Optional) Weights information needed for CLConvolutionLayer, specifies if the weights tensor has been reshaped with CLWeightsReshapeKernel. |
Definition at line 44 of file CLDeconvolutionLayer.cpp.
References CLKernelLibrary::get().
void configure | ( | const CLCompileContext & | compile_context, |
ICLTensor * | input, | ||
ICLTensor * | weights, | ||
const ICLTensor * | bias, | ||
ICLTensor * | output, | ||
const PadStrideInfo & | deconv_info, | ||
const WeightsInfo & | weights_info = WeightsInfo() |
||
) |
Set the input, weights, biases and output tensors.
[in] | compile_context | The compile context to be used. |
[in,out] | input | Input tensor. 3 lower dimensions represent a single input, and an optional 4th dimension for batch of inputs. Data types supported: QASYMM8_SIGNED/QASYMM8/F16/F32. |
[in] | weights | The 4d weights with dimensions [width, height, IFM, OFM]. Data type supported: Same as input . |
[in] | bias | (Optional) The biases have one dimension. Data type supported: Same as input . |
[out] | output | Output tensor. The output has the same number of dimensions as the input . |
[in] | deconv_info | Contains padding and policies to be used in the deconvolution, this is described in PadStrideInfo. |
[in] | weights_info | (Optional) Weights information needed for CLConvolutionLayer, specifies if the weights tensor has been reshaped with CLWeightsReshapeKernel. |
Definition at line 50 of file CLDeconvolutionLayer.cpp.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON_NULLPTR, arm_compute::DIRECT, arm_compute::GEMM, CLDeconvolutionLayer::get_deconvolution_method(), ITensor::info(), and arm_compute::test::validation::weights_info.
|
static |
Definition at line 103 of file CLDeconvolutionLayer.cpp.
References ARM_COMPUTE_UNUSED, arm_compute::test::validation::data_layout, ITensorInfo::data_layout(), ITensorInfo::dimension(), arm_compute::DIRECT, arm_compute::GEMM, arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, PadStrideInfo::stride(), and arm_compute::WIDTH.
Referenced by CLDeconvolutionLayer::configure(), and CLDeconvolutionLayer::validate().
|
overridevirtual |
Prepare the function for executing.
Any one off pre-processing step required by the function is handled here
Reimplemented from IFunction.
Definition at line 127 of file CLDeconvolutionLayer.cpp.
Referenced by CLDeconvolutionLayer::run().
|
overridevirtual |
Run the kernels contained in the function.
For Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 121 of file CLDeconvolutionLayer.cpp.
References CLDeconvolutionLayer::prepare().
|
static |
Static function to check if given info will lead to a valid configuration of CLDeconvolutionLayer.
[in] | input | Input tensor info. 3 lower dimensions represent a single input, and an optional 4th dimension for batch of inputs. Data types supported: QASYMM8_SIGNED/QASYMM8/F16/F32. |
[in] | weights | The 4d weights info with dimensions [width, height, IFM, OFM]. Data type supported: Same as input . |
[in] | bias | (Optional) The biases have one dimension. Data type supported: Same as input . |
[in] | output | Output tensor info. The output has the same number of dimensions as the input . |
[in] | deconv_info | Contains padding and policies to be used in the deconvolution, this is described in PadStrideInfo. |
[in] | weights_info | (Optional) Weights information needed for CLConvolutionLayer, specifies if the weights tensor has been reshaped with CLWeightsReshapeKernel. |
Definition at line 77 of file CLDeconvolutionLayer.cpp.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, ARM_COMPUTE_RETURN_ON_ERROR, arm_compute::DIRECT, arm_compute::GEMM, CLDeconvolutionLayer::get_deconvolution_method(), CLGEMMDeconvolutionLayer::validate(), and CLDirectDeconvolutionLayer::validate().
Referenced by arm_compute::test::validation::DATA_TEST_CASE().