Compute Library
 19.08
NEQuantizationLayer Class Reference

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

#include <NEQuantizationLayer.h>

Collaboration diagram for NEQuantizationLayer:
[legend]

Public Member Functions

 NEQuantizationLayer ()=default
 Default constructor. More...
 
void configure (const ITensor *input, ITensor *output)
 Set the input and output tensors. More...
 
- Public Member Functions inherited from INESimpleFunctionNoBorder
 INESimpleFunctionNoBorder ()
 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 NEQuantizationLayer. More...
 

Detailed Description

Basic function to simulate a quantization layer.

This function calls the following NEON kernels:

  1. NEQuantizationLayerKernel

Definition at line 44 of file NEQuantizationLayer.h.

Constructor & Destructor Documentation

◆ NEQuantizationLayer()

NEQuantizationLayer ( )
default

Default constructor.

Member Function Documentation

◆ configure()

void configure ( const ITensor input,
ITensor output 
)

Set the input and output tensors.

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

Definition at line 40 of file NEQuantizationLayer.cpp.

41 {
42  ARM_COMPUTE_ERROR_ON_NULLPTR(input, output);
43 
44  // Configure quantize kernel
45  auto k = arm_compute::support::cpp14::make_unique<NEQuantizationLayerKernel>();
46  k->configure(input, output);
47  _kernel = std::move(k);
48 }
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
Definition: Validate.h:161

References ARM_COMPUTE_ERROR_ON_NULLPTR.

Referenced by NELSTMLayerQuantized::configure().

◆ validate()

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

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

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

Definition at line 32 of file NEQuantizationLayer.cpp.

33 {
36 
37  return Status{};
38 }
#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 *output)
Static function to check if given info will lead to a valid configuration of NEQuantizationLayerKerne...
Status class.
Definition: Error.h:52
#define ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(...)
Definition: Validate.h:163

References ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, ARM_COMPUTE_RETURN_ON_ERROR, and NEQuantizationLayerKernel::validate().

Referenced by NELSTMLayerQuantized::validate().


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