ONE - On-device Neural Engine
|
DumpingHooks is intended to save intermediate results. More...
#include <DumpingHooks.h>
Public Member Functions | |
DumpingHooks (const std::string &save_path, const Quantizer::Context &ctx) | |
DumpingHooks constructor. | |
virtual void | onQuantized (luci::Module *module) const override |
called on successfull quantization | |
virtual void | onBeginSolver (const std::string &model_path, float q8error, float q16error) override |
called on the start of mpq search | |
virtual void | onBeginIteration () override |
called on the start of current iteration | |
virtual void | onEndIteration (const LayerParams &layers, const std::string &def_dtype, float error) override |
called at the end of current iteration | |
virtual void | onEndSolver (const LayerParams &layers, const std::string &def_dtype, float qerror) override |
called at the end of mpq search | |
DumpingHooks is intended to save intermediate results.
Definition at line 36 of file DumpingHooks.h.
DumpingHooks::DumpingHooks | ( | const std::string & | save_path, |
const Quantizer::Context & | ctx | ||
) |
DumpingHooks constructor.
save_path | directory where all intermediate data will be saved |
Definition at line 22 of file DumpingHooks.cpp.
|
overridevirtual |
called on the start of current iteration
Implements mpqsolver::core::SolverHooks.
Definition at line 45 of file DumpingHooks.cpp.
|
overridevirtual |
called on the start of mpq search
Implements mpqsolver::core::SolverHooks.
Definition at line 27 of file DumpingHooks.cpp.
References mpqsolver::core::Dumper::dumpQ16Error(), mpqsolver::core::Dumper::dumpQ8Error(), mpqsolver::core::Dumper::prepareForErrorDumping(), and mpqsolver::core::Dumper::setModelPath().
|
overridevirtual |
called at the end of current iteration
Implements mpqsolver::core::SolverHooks.
Definition at line 51 of file DumpingHooks.cpp.
References mpqsolver::core::Dumper::dumpMPQConfiguration(), mpqsolver::core::Dumper::dumpMPQError(), and mpqsolver::core::Quantizer::Context::granularity.
|
overridevirtual |
called at the end of mpq search
Implements mpqsolver::core::SolverHooks.
Definition at line 59 of file DumpingHooks.cpp.
References mpqsolver::core::Dumper::dumpFinalMPQ(), mpqsolver::core::Dumper::dumpMPQError(), and mpqsolver::core::Quantizer::Context::granularity.
|
overridevirtual |
called on successfull quantization
Implements mpqsolver::core::QuantizerHook.
Definition at line 69 of file DumpingHooks.cpp.
References mpqsolver::core::Dumper::dumpQuantized().