ArmNN
 20.02
INetworkQuantizer Class Referenceabstract

Quantizer class Quantizes a float32 InputNetwork. More...

#include <INetworkQuantizer.hpp>

Inheritance diagram for INetworkQuantizer:
NetworkQuantizer

Public Member Functions

virtual void OverrideInputRange (LayerBindingId layerId, float min, float max)=0
 Overrides the default quantization values for the input layer with the given id. More...
 
virtual void Refine (const InputTensors &inputTensors)=0
 Refine input network with a set of refinement data for specified LayerBindingId. More...
 
virtual INetworkPtr ExportNetwork ()=0
 Extract final quantized network. More...
 

Static Public Member Functions

static INetworkQuantizerCreateRaw (INetwork *inputNetwork, const QuantizerOptions &options=QuantizerOptions())
 Create Quantizer object and return raw pointer. More...
 
static INetworkQuantizerPtr Create (INetwork *inputNetwork, const QuantizerOptions &options=QuantizerOptions())
 Create Quantizer object wrapped in unique_ptr. More...
 
static void Destroy (INetworkQuantizer *quantizer)
 Destroy Quantizer object. More...
 

Protected Member Functions

virtual ~INetworkQuantizer ()
 

Detailed Description

Quantizer class Quantizes a float32 InputNetwork.

Definition at line 32 of file INetworkQuantizer.hpp.

Constructor & Destructor Documentation

◆ ~INetworkQuantizer()

virtual ~INetworkQuantizer ( )
inlineprotectedvirtual

Definition at line 54 of file INetworkQuantizer.hpp.

54 {}

Member Function Documentation

◆ Create()

INetworkQuantizerPtr Create ( INetwork inputNetwork,
const QuantizerOptions options = QuantizerOptions() 
)
static

Create Quantizer object wrapped in unique_ptr.

Definition at line 40 of file NetworkQuantizer.cpp.

References INetworkQuantizer::CreateRaw(), and INetworkQuantizer::Destroy().

Referenced by armnn::BOOST_AUTO_TEST_CASE(), main(), armnn::PreserveTypeTestImpl(), armnn::TestQuantizeConvolution2d(), armnn::TestQuantizeDepthwiseConvolution2d(), armnn::TestQuantizeTransposeConvolution2d(), and armnn::ValidateFullyConnectedLayer().

41 {
43 }
std::unique_ptr< class INetworkQuantizer, void(*)(INetworkQuantizer *quantizer)> INetworkQuantizerPtr
static void Destroy(INetworkQuantizer *quantizer)
Destroy Quantizer object.
static INetworkQuantizer * CreateRaw(INetwork *inputNetwork, const QuantizerOptions &options=QuantizerOptions())
Create Quantizer object and return raw pointer.
armnn::Runtime::CreationOptions::ExternalProfilingOptions options

◆ CreateRaw()

INetworkQuantizer * CreateRaw ( INetwork inputNetwork,
const QuantizerOptions options = QuantizerOptions() 
)
static

Create Quantizer object and return raw pointer.

Definition at line 35 of file NetworkQuantizer.cpp.

Referenced by INetworkQuantizer::Create().

36 {
37  return new NetworkQuantizer(inputNetwork, options);
38 }
armnn::Runtime::CreationOptions::ExternalProfilingOptions options

◆ Destroy()

void Destroy ( INetworkQuantizer quantizer)
static

Destroy Quantizer object.

Definition at line 45 of file NetworkQuantizer.cpp.

Referenced by INetworkQuantizer::Create().

46 {
47  delete boost::polymorphic_downcast<NetworkQuantizer*>(quantizer);
48 }

◆ ExportNetwork()

virtual INetworkPtr ExportNetwork ( )
pure virtual

Extract final quantized network.

Implemented in NetworkQuantizer.

◆ OverrideInputRange()

virtual void OverrideInputRange ( LayerBindingId  layerId,
float  min,
float  max 
)
pure virtual

Overrides the default quantization values for the input layer with the given id.

Implemented in NetworkQuantizer.

◆ Refine()

virtual void Refine ( const InputTensors inputTensors)
pure virtual

Refine input network with a set of refinement data for specified LayerBindingId.

Implemented in NetworkQuantizer.


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