ONE - On-device Neural Engine
|
#include <CLTransposeConvLayer.h>
Public Member Functions | |
CLTransposeConvLayer (std::shared_ptr< IMemoryManager > memory_manager=nullptr) | |
void | configure (ICLTensor *input, ICLTensor *weights, const ICLTensor *bias, ICLTensor *output, const PadStrideInfo &deconv_info, unsigned int invalid_right, unsigned int invalid_bottom, const WeightsInfo &weights_info=WeightsInfo()) |
void | configure (const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *weights, const ICLTensor *bias, ICLTensor *output, const PadStrideInfo &deconv_info, unsigned int invalid_right, unsigned int invalid_bottom, const WeightsInfo &weights_info=WeightsInfo()) |
void | run () override |
void | prepare () override |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *bias, ITensorInfo *output, const PadStrideInfo &deconv_info, unsigned int invalid_right, unsigned int invalid_bottom, const WeightsInfo &weights_info=WeightsInfo()) |
static DeconvolutionMethod | get_deconvolution_method (const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *bias, ITensorInfo *output, const PadStrideInfo &deconv_info, unsigned int invalid_right, unsigned int invalid_bottom, const WeightsInfo &weights_info) |
Basic function to compute the deconvolution layer. This function calls the following OpenCL kernels/functions:
Definition at line 58 of file CLTransposeConvLayer.h.
CLTransposeConvLayer::CLTransposeConvLayer | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr | ) |
Default constructor
Definition at line 56 of file CLTransposeConvLayer.cpp.
void CLTransposeConvLayer::configure | ( | const CLCompileContext & | compile_context, |
ICLTensor * | input, | ||
ICLTensor * | weights, | ||
const ICLTensor * | bias, | ||
ICLTensor * | output, | ||
const PadStrideInfo & | deconv_info, | ||
unsigned int | invalid_right, | ||
unsigned int | invalid_bottom, | ||
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] | invalid_right | The number of zeros added to right edge of the output. |
[in] | invalid_bottom | The number of zeros added to bottom edge of the output. |
[in] | weights_info | (Optional) Weights information needed for CLConvolutionLayer, specifies if the weights tensor has been reshaped with CLWeightsReshapeKernel. |
Definition at line 70 of file CLTransposeConvLayer.cpp.
References get_deconvolution_method().
void CLTransposeConvLayer::configure | ( | ICLTensor * | input, |
ICLTensor * | weights, | ||
const ICLTensor * | bias, | ||
ICLTensor * | output, | ||
const PadStrideInfo & | deconv_info, | ||
unsigned int | invalid_right, | ||
unsigned int | invalid_bottom, | ||
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] | invalid_right | The number of zeros added to right edge of the output. |
[in] | invalid_bottom | The number of zeros added to bottom edge of the output. |
[in] | weights_info | (Optional) Weights information needed for CLConvolutionLayer, specifies if the weights tensor has been reshaped with CLWeightsReshapeKernel. |
Definition at line 61 of file CLTransposeConvLayer.cpp.
References configure().
Referenced by configure().
|
static |
Definition at line 133 of file CLTransposeConvLayer.cpp.
Referenced by configure(), and validate().
|
override |
Definition at line 161 of file CLTransposeConvLayer.cpp.
Referenced by run().
|
override |
Definition at line 155 of file CLTransposeConvLayer.cpp.
References prepare().
Referenced by package.infer.session::inference().
|
static |
Static function to check if given info will lead to a valid configuration of CLTransposeConvLayer
[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] | invalid_right | The number of zeros added to right edge of the output. |
[in] | invalid_bottom | The number of zeros added to bottom edge of the output. |
[in] | weights_info | (Optional) Weights information needed for CLConvolutionLayer, specifies if the weights tensor has been reshaped with CLWeightsReshapeKernel. |
Definition at line 102 of file CLTransposeConvLayer.cpp.
References get_deconvolution_method(), and arm_compute::CLDirectTransposeConvLayer::validate().