Compute Library
 19.08
CLQuantizationLayer Class Reference

Basic function to simulate a quantization layer. More...

#include <CLQuantizationLayer.h>

Collaboration diagram for CLQuantizationLayer:
[legend]

Public Member Functions

void configure (const ICLTensor *input, ICLTensor *output)
 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 *output)
 Static function to check if given info will lead to a valid configuration of CLQuantizationLayer. More...
 

Detailed Description

Basic function to simulate a quantization layer.

This function calls the following CL kernels:

Note
The implementation supports only 3D input tensors.
  1. CLQuantizationLayerKernel

Definition at line 40 of file CLQuantizationLayer.h.

Member Function Documentation

◆ configure()

void configure ( const ICLTensor input,
ICLTensor output 
)

Set the input and output tensors.

Parameters
[in]inputSource tensor. The dimensions over the third will be interpreted as batches. Data types supported: F16/32.
[out]outputDestination tensor with the same dimensions of input. Output data type must be QASYMM8.

Definition at line 31 of file CLQuantizationLayer.cpp.

32 {
33  auto k = arm_compute::support::cpp14::make_unique<CLQuantizationLayerKernel>();
34  k->configure(input, output);
35  _kernel = std::move(k);
36 }

Referenced by CLLSTMLayerQuantized::configure(), and arm_compute::test::validation::DATA_TEST_CASE().

◆ validate()

Status validate ( const ITensorInfo input,
const ITensorInfo output 
)
static

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

Parameters
[in]inputInput tensor info. The dimensions over the third will be interpreted as batches. Data types supported: F16/32.
[in]outputOutput tensor info. Output data type must be QASYMM8.
Returns
a status

Definition at line 38 of file CLQuantizationLayer.cpp.

39 {
40  return CLQuantizationLayerKernel::validate(input, output);
41 }
static Status validate(const ITensorInfo *input, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of CLQuantizationLayerKerne...

References CLQuantizationLayerKernel::validate().

Referenced by CLLSTMLayerQuantized::validate().


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