Compute Library
 21.02
NEROIAlignLayer Class Reference

Basic function to run NEROIAlignLayerKernel. More...

#include <NEROIAlignLayer.h>

Collaboration diagram for NEROIAlignLayer:
[legend]

Public Member Functions

void configure (const ITensor *input, const ITensor *rois, ITensor *output, const ROIPoolingLayerInfo &pool_info)
 Set the input and output tensors. More...
 
- Public Member Functions inherited from INESimpleFunctionNoBorder
 INESimpleFunctionNoBorder (IRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 INESimpleFunctionNoBorder (const INESimpleFunctionNoBorder &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 INESimpleFunctionNoBorder (INESimpleFunctionNoBorder &&)=default
 Default move constructor. More...
 
INESimpleFunctionNoBorderoperator= (const INESimpleFunctionNoBorder &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
INESimpleFunctionNoBorderoperator= (INESimpleFunctionNoBorder &&)=default
 Default move assignment operator. More...
 
 ~INESimpleFunctionNoBorder ()
 Default destructor. 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...
 

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...
 

Detailed Description

Basic function to run NEROIAlignLayerKernel.

This function calls the following Neon kernels:

  1. NEROIAlignLayerKernel

Definition at line 41 of file NEROIAlignLayer.h.

Member Function Documentation

◆ configure()

void configure ( const ITensor input,
const ITensor rois,
ITensor output,
const ROIPoolingLayerInfo pool_info 
)

Set the input and output tensors.

Parameters
[in]inputSource tensor. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32.
[in]roisROIs 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, otherwise same as input
[out]outputDestination tensor. Data types supported: Same as input.
[in]pool_infoContains pooling operation information described in ROIPoolingLayerInfo.
Note
The x and y dimensions of output tensor must be the same as pool_info 's pooled width and pooled height.
The z dimensions of output tensor and input tensor must be the same.
The fourth dimension of output tensor must be the same as the number of elements in rois array.

Definition at line 38 of file NEROIAlignLayer.cpp.

39 {
40  // Configure ROI pooling kernel
41  auto k = std::make_unique<NEROIAlignLayerKernel>();
42  k->configure(input, rois, output, pool_info);
43  _kernel = std::move(k);
44 }

◆ validate()

Status validate ( const ITensorInfo input,
const ITensorInfo rois,
ITensorInfo output,
const ROIPoolingLayerInfo pool_info 
)
static

Static function to check if given info will lead to a valid configuration of NEROIAlignLayerKernel.

Parameters
[in]inputSource tensor info. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32.
[in]roisROIs tensor info. Data types supported: QASYMM16 with scale of 0.125 and 0 offset if input is QASYMM8, otherwise same as input
[in]outputDestination tensor info. Data types supported: Same as input.
[in]pool_infoContains pooling operation information described in ROIPoolingLayerInfo.
Note
The x and y dimensions of output tensor must be the same as pool_info 's pooled width and pooled height.
The z dimensions of output tensor and input tensor must be the same.
The fourth dimension of output tensor must be the same as the number of elements in rois array.
Returns
a Status

Definition at line 31 of file NEROIAlignLayer.cpp.

References ARM_COMPUTE_RETURN_ON_ERROR, and NEROIAlignLayerKernel::validate().

Referenced by arm_compute::test::validation::DATA_TEST_CASE().

32 {
34 
35  return Status{};
36 }
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
Definition: Error.h:204
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.

The documentation for this class was generated from the following files: