ArmNN
 21.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 41 of file NetworkQuantizer.cpp.

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

Referenced by armnn::BOOST_AUTO_TEST_CASE(), main(), armnn::PreserveTypeTestImpl(), and armnn::TestNetwork().

42 {
43  return INetworkQuantizerPtr(CreateRaw(inputNetwork, options), &INetworkQuantizer::Destroy);
44 }
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.

◆ CreateRaw()

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

Create Quantizer object and return raw pointer.

Definition at line 36 of file NetworkQuantizer.cpp.

Referenced by INetworkQuantizer::Create().

37 {
38  return new NetworkQuantizer(inputNetwork, options);
39 }

◆ Destroy()

void Destroy ( INetworkQuantizer quantizer)
static

Destroy Quantizer object.

Definition at line 46 of file NetworkQuantizer.cpp.

Referenced by INetworkQuantizer::Create().

47 {
48  delete PolymorphicDowncast<NetworkQuantizer*>(quantizer);
49 }

◆ 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: