ONE - On-device Neural Engine
|
#include <Quantizer.h>
Data Structures | |
struct | Context |
Public Member Functions | |
Quantizer (const Context &ctx) | |
void | setHook (const QuantizerHook *callback) |
set hook on the end of quantization event | |
bool | quantize (luci::Module *module, const std::string &quant_dtype, LayerParams &layer_params) |
quantize recorded module (min/max initialized) with specified parameters returns true on success | |
bool | quantize (luci::Module *module, LayerParams &layer_params) |
quantize recorded module (min/max initialized) with specified parameters returns true on success | |
bool | fakeQuantize (luci::Module *module, const std::string &quant_dtype, LayerParams &layer_params) |
fake_quantize recorded module (min/max initialized) with specified parameters returns true on success | |
const Context & | getContext () const |
Definition at line 44 of file Quantizer.h.
|
inline |
Definition at line 59 of file Quantizer.h.
bool Quantizer::fakeQuantize | ( | luci::Module * | module, |
const std::string & | quant_dtype, | ||
LayerParams & | layer_params | ||
) |
fake_quantize recorded module (min/max initialized) with specified parameters returns true on success
Definition at line 132 of file Quantizer.cpp.
References quantize().
|
inline |
Definition at line 85 of file Quantizer.h.
bool Quantizer::quantize | ( | luci::Module * | module, |
const std::string & | quant_dtype, | ||
LayerParams & | layer_params | ||
) |
quantize recorded module (min/max initialized) with specified parameters returns true on success
Definition at line 58 of file Quantizer.cpp.
References mpqsolver::core::Quantizer::Context::granularity, mpqsolver::core::Quantizer::Context::input_type, mpqsolver::core::QuantizerHook::onQuantized(), luci::CircleQuantizer::options(), mpqsolver::core::Quantizer::Context::output_type, luci::CircleQuantizer::quantize(), mpqsolver::core::Quantizer::Context::save_min_max, mpqsolver::core::Quantizer::Context::TF_style_maxpool, and luci::validate().
Referenced by fakeQuantize(), and quantize().
bool Quantizer::quantize | ( | luci::Module * | module, |
LayerParams & | layer_params | ||
) |
quantize recorded module (min/max initialized) with specified parameters returns true on success
Definition at line 123 of file Quantizer.cpp.
References mpqsolver::core::Quantizer::Context::output_model_dtype, and quantize().
void Quantizer::setHook | ( | const QuantizerHook * | callback | ) |
set hook on the end of quantization event
Definition at line 52 of file Quantizer.cpp.