21.02
|
Interface for the RoIAlign kernel. More...
#include <NEROIAlignLayerKernel.h>
Public Member Functions | |
const char * | name () const override |
Name of the kernel. More... | |
NEROIAlignLayerKernel () | |
Constructor. More... | |
NEROIAlignLayerKernel (const NEROIAlignLayerKernel &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEROIAlignLayerKernel & | operator= (const NEROIAlignLayerKernel &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEROIAlignLayerKernel (NEROIAlignLayerKernel &&)=default | |
Default Move Constructor. More... | |
NEROIAlignLayerKernel & | operator= (NEROIAlignLayerKernel &&)=default |
Default move assignment operator. More... | |
~NEROIAlignLayerKernel ()=default | |
Default destructor. More... | |
void | configure (const ITensor *input, const ITensor *rois, ITensor *output, const ROIPoolingLayerInfo &pool_info) |
Set the input and output tensors. More... | |
void | run (const Window &window, const ThreadInfo &info) override |
Execute the kernel on the passed window. More... | |
Public Member Functions inherited from ICPPKernel | |
virtual | ~ICPPKernel ()=default |
Default destructor. More... | |
virtual void | run_nd (const Window &window, const ThreadInfo &info, const Window &thread_locator) |
legacy compatibility layer for implemantions which do not support thread_locator In these cases we simply narrow the interface down the legacy version More... | |
virtual void | run_op (ITensorPack &tensors, const Window &window, const ThreadInfo &info) |
Execute the kernel on the passed window. More... | |
Public Member Functions inherited from IKernel | |
IKernel () | |
Constructor. More... | |
virtual | ~IKernel ()=default |
Destructor. More... | |
virtual bool | is_parallelisable () const |
Indicates whether or not the kernel is parallelisable. More... | |
virtual BorderSize | border_size () const |
The size of the border for that kernel. More... | |
const Window & | window () const |
The maximum window the kernel can be executed on. More... | |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *input, const ITensorInfo *rois, ITensorInfo *output, const ROIPoolingLayerInfo &pool_info) |
Static function to check if given info will lead to a valid configuration of NEROIAlignLayerKernel. More... | |
Interface for the RoIAlign kernel.
Definition at line 35 of file NEROIAlignLayerKernel.h.
Constructor.
Definition at line 79 of file NEROIAlignLayerKernel.cpp.
Referenced by NEROIAlignLayerKernel::name().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default Move Constructor.
|
default |
Default destructor.
Referenced by NEROIAlignLayerKernel::name().
void configure | ( | const ITensor * | input, |
const ITensor * | rois, | ||
ITensor * | output, | ||
const ROIPoolingLayerInfo & | pool_info | ||
) |
Set the input and output tensors.
[in] | input | Source tensor. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32. |
[in] | rois | ROIs tensor, it is a 2D tensor of size [5, N] (where N is the number of ROIs) containing top left and bottom right corner as coordinate of an image and batch_id of ROI [ batch_id, x1, y1, x2, y2 ]. Data types supported: QASYMM16 with scale of 0.125 and 0 offset if input is QASYMM8/QASYMM8_SIGNED, otherwise same as input |
[out] | output | Destination tensor. Data types supported: Same as input . |
[in] | pool_info | Contains pooling operation information described in ROIPoolingLayerInfo. |
output
tensor must be the same as pool_info
's pooled width and pooled height. output
tensor and input
tensor must be the same. output
tensor must be the same as the number of elements in rois
array. Definition at line 84 of file NEROIAlignLayerKernel.cpp.
References ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_THROW_ON, arm_compute::auto_init_if_empty(), arm_compute::misc::shape_calculator::compute_roi_align_shape(), ITensorInfo::data_layout(), ITensorInfo::data_type(), ITensorInfo::dimension(), Window::DimX, Window::DimY, ITensor::info(), arm_compute::test::validation::input, ITensorInfo::num_dimensions(), arm_compute::test::validation::output_shape, ITensorInfo::quantization_info(), Window::set(), ITensorInfo::set_data_layout(), Dimensions< T >::set_num_dimensions(), ITensorInfo::set_valid_region(), ITensorInfo::tensor_shape(), arm_compute::validate_arguments(), and IKernel::window().
Referenced by NEROIAlignLayerKernel::name().
|
inlineoverridevirtual |
Name of the kernel.
Implements ICPPKernel.
Definition at line 38 of file NEROIAlignLayerKernel.h.
References NEROIAlignLayerKernel::configure(), arm_compute::test::validation::info, arm_compute::test::validation::input, NEROIAlignLayerKernel::NEROIAlignLayerKernel(), NEROIAlignLayerKernel::operator=(), NEROIAlignLayerKernel::run(), NEROIAlignLayerKernel::validate(), IKernel::window(), and NEROIAlignLayerKernel::~NEROIAlignLayerKernel().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
Referenced by NEROIAlignLayerKernel::name().
|
default |
Default move assignment operator.
|
overridevirtual |
Execute the kernel on the passed window.
[in] | window | Region on which to execute the kernel. (Must be a region of the window returned by window()) |
[in] | info | Info about executing thread and CPU. |
Reimplemented from ICPPKernel.
Definition at line 301 of file NEROIAlignLayerKernel.cpp.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW, ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL, ARM_COMPUTE_UNUSED, ITensor::buffer(), arm_compute::CHANNEL, arm_compute::compute_region_coordinate(), arm_compute::test::validation::data_layout, ITensorInfo::data_layout(), arm_compute::test::validation::data_type, ITensorInfo::data_type(), arm_compute::dequantize_qasymm16(), ITensorInfo::dimension(), Window::Dimension::end(), arm_compute::F16, arm_compute::F32, arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::test::validation::idx_height, arm_compute::test::validation::idx_width, ITensor::info(), arm_compute::test::validation::info, input_height, input_width, arm_compute::is_data_type_quantized_asymmetric(), arm_compute::NCHW, arm_compute::NHWC, ROIPoolingLayerInfo::pooled_height(), ROIPoolingLayerInfo::pooled_width(), ITensor::ptr_to_element(), arm_compute::QASYMM8, arm_compute::QASYMM8_SIGNED, ITensorInfo::quantization_info(), ROIPoolingLayerInfo::sampling_ratio(), ROIPoolingLayerInfo::spatial_scale(), Window::Dimension::start(), arm_compute::WIDTH, IKernel::window(), and Window::x().
Referenced by NEROIAlignLayerKernel::name().
|
static |
Static function to check if given info will lead to a valid configuration of NEROIAlignLayerKernel.
[in] | input | Source tensor info. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32. |
[in] | rois | ROIs tensor info. Data types supported: QASYMM16 with scale of 0.125 and 0 offset if input is QASYMM8/QASYMM8_SIGNED, otherwise same as input |
[in] | output | Destination tensor info. Data types supported: Same as input . |
[in] | pool_info | Contains pooling operation information described in ROIPoolingLayerInfo. |
output
tensor must be the same as pool_info
's pooled width and pooled height. output
tensor and input
tensor must be the same. output
tensor must be the same as the number of elements in rois
array.Definition at line 112 of file NEROIAlignLayerKernel.cpp.
References ARM_COMPUTE_RETURN_ON_ERROR, and arm_compute::validate_arguments().
Referenced by NEROIAlignLayerKernel::name(), and NEROIAlignLayer::validate().