From a1f2ed008fb8bf0c938f05795d9f3af159e7d292 Mon Sep 17 00:00:00 2001 From: Summer Deng Date: Thu, 14 Feb 2019 21:58:22 -0800 Subject: [PATCH] Minor fix of the histogram observer in FBL eval flows (#17118) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/17118 Fix the bug in quantization eval workflow; Add mul_nets option in histogram observer pybind Reviewed By: yinghai Differential Revision: D14085321 fbshipit-source-id: 08e3153148522ebc9512a57144d9a8ad154bb6f8 --- caffe2/quantization/server/pybind.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/caffe2/quantization/server/pybind.cc b/caffe2/quantization/server/pybind.cc index 535b06d..05cb64c 100644 --- a/caffe2/quantization/server/pybind.cc +++ b/caffe2/quantization/server/pybind.cc @@ -22,14 +22,16 @@ PYBIND11_MODULE(dnnlowp_pybind11, m) { m.def( "ObserveHistogramOfOutput", - [](const string& out_file_name, int dump_freq) { - AddGlobalNetObserverCreator([out_file_name, dump_freq](NetBase* net) { - return make_unique( - net, out_file_name, 2048, dump_freq); - }); + [](const string& out_file_name, int dump_freq, bool mul_nets) { + AddGlobalNetObserverCreator( + [out_file_name, dump_freq, mul_nets](NetBase* net) { + return make_unique( + net, out_file_name, 2048, dump_freq, mul_nets); + }); }, pybind11::arg("out_file_name"), - pybind11::arg("dump_freq") = -1); + pybind11::arg("dump_freq") = -1, + pybind11::arg("mul_nets") = false); m.def( "RegisterQuantizationParams", -- 2.7.4