24.02.1
|
Basic function to pad a tensor. More...
#include <NEPadLayer.h>
Public Member Functions | |
NEPadLayer () | |
Default Constructor. More... | |
NEPadLayer (const NEPadLayer &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEPadLayer & | operator= (const NEPadLayer &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEPadLayer (NEPadLayer &&)=delete | |
Prevent instances of this class from being moved (As this class contains non movable objects) More... | |
NEPadLayer & | operator= (NEPadLayer &&)=delete |
Prevent instances of this class from being moved (As this class contains non movable objects) More... | |
~NEPadLayer () | |
Default destructor. More... | |
void | configure (ITensor *input, ITensor *output, const PaddingList &padding, const PixelValue constant_value=PixelValue(), const PaddingMode mode=PaddingMode::CONSTANT) |
Initialize the function. 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... | |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *input, const ITensorInfo *output, const PaddingList &padding, const PixelValue constant_value=PixelValue(), const PaddingMode mode=PaddingMode::CONSTANT) |
Static function to check if given info will lead to a valid configuration of NEPadLayer. More... | |
Basic function to pad a tensor.
This function calls the following functions/kernels:
Definition at line 51 of file NEPadLayer.h.
NEPadLayer | ( | ) |
Default Constructor.
Definition at line 54 of file NEPadLayer.cpp.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
delete |
Prevent instances of this class from being moved (As this class contains non movable objects)
|
default |
Default destructor.
void configure | ( | ITensor * | input, |
ITensor * | output, | ||
const PaddingList & | padding, | ||
const PixelValue | constant_value = PixelValue() , |
||
const PaddingMode | mode = PaddingMode::CONSTANT |
||
) |
Initialize the function.
Valid data layouts:
Valid data type configurations:
src | dst |
---|---|
All | All |
[in] | input | Source tensor. Data types supported: All. |
[out] | output | Output tensor. Data type supported: same as input |
[in] | padding | The padding for each spatial dimension of the input tensor. The pair padding[i] specifies the front and the end padding in the i-th dimension. |
[in] | constant_value | (Optional) Constant value to be used for the padding |
[in] | mode | (Optional) Controls whether the padding should be filled with constant_value using CONSTANT, or reflect the input, either including the border values (SYMMETRIC) or not (REFLECT). |
Definition at line 186 of file NEPadLayer.cpp.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_THROW_ON, ARM_COMPUTE_LOG_PARAMS, arm_compute::auto_init_if_empty(), arm_compute::misc::shape_calculator::compute_padded_shape(), NECopy::configure(), arm_compute::CONSTANT, ITensor::info(), arm_compute::test::validation::input, clang_tidy_rules::mode, arm_compute::REFLECT, arm_compute::SYMMETRIC, and NEPadLayer::validate().
Referenced by NEFFTConvolutionLayer::configure(), and NEGenerateProposalsLayer::configure().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
delete |
Prevent instances of this class from being moved (As this class contains non movable objects)
|
overridevirtual |
Run the kernels contained in the function.
For CPU kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 279 of file NEPadLayer.cpp.
References ARM_COMPUTE_ERROR, arm_compute::CONSTANT, Window::DimZ, Scheduler::get(), arm_compute::test::validation::info, arm_compute::REFLECT, NECopy::run(), IScheduler::schedule(), and arm_compute::SYMMETRIC.
Referenced by NEFFTConvolutionLayer::prepare(), NEGenerateProposalsLayer::run(), and NEFFTConvolutionLayer::run().
|
static |
Static function to check if given info will lead to a valid configuration of NEPadLayer.
[in] | input | Source tensor info. Data types supported: All. |
[in] | output | Output tensor info. Data type supported: same as input |
[in] | padding | The padding for each spatial dimension of the input tensor. The pair padding[i] specifies the front and the end padding in the i-th dimension. |
[in] | constant_value | (Optional) Constant value to be used for the padding |
[in] | mode | (Optional) Controls whether the padding should be filled with constant_value using CONSTANT, or reflect the input, either including the border values (SYMMETRIC) or not (REFLECT). |
Definition at line 231 of file NEPadLayer.cpp.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_RETURN_ERROR_ON, ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES, ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DIMENSIONS, ARM_COMPUTE_UNUSED, arm_compute::misc::shape_calculator::compute_padded_shape(), arm_compute::CONSTANT, arm_compute::test::validation::input, clang_tidy_rules::mode, arm_compute::REFLECT, arm_compute::SYMMETRIC, ITensorInfo::tensor_shape(), ITensorInfo::total_size(), and NEPadLayerKernel::validate().
Referenced by NEPadLayer::configure(), and NEGenerateProposalsLayer::validate().