Compute Library
 19.08
CLROIAlignLayer Class Reference

Basic function to run CLROIAlignLayerKernel. More...

#include <CLROIAlignLayer.h>

Collaboration diagram for CLROIAlignLayer:
[legend]

Public Member Functions

void configure (const ICLTensor *input, const ICLTensor *rois, ICLTensor *output, const ROIPoolingLayerInfo &pool_info)
 Set the input and output tensors. More...
 
- Public Member Functions inherited from ICLSimpleFunction
 ICLSimpleFunction ()
 Default constructor. 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 CLROIAlignLayer. More...
 

Detailed Description

Basic function to run CLROIAlignLayerKernel.

This function calls the following OpenCL kernels:

  1. CLROIAlignLayerKernel

Definition at line 41 of file CLROIAlignLayer.h.

Member Function Documentation

◆ configure()

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

Set the input and output tensors.

Parameters
[in]inputSource tensor. Data types supported: 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: 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 39 of file CLROIAlignLayer.cpp.

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

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

Parameters
[in]inputSource tensor info. Data types supported: F16/F32.
[in]roisROIs tensor info. Data types supported: same as input
[out]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 32 of file CLROIAlignLayer.cpp.

33 {
34  ARM_COMPUTE_RETURN_ON_ERROR(CLROIAlignLayerKernel::validate(input, rois, output, pool_info));
35 
36  return Status{};
37 }
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
Definition: Error.h:193
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 CLROIAlignLayerKernel.

References ARM_COMPUTE_RETURN_ON_ERROR, and CLROIAlignLayerKernel::validate().


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