From: Summer Deng Date: Fri, 15 Feb 2019 05:58:22 +0000 (-0800) Subject: Minor fix of the histogram observer in FBL eval flows (#17118) X-Git-Tag: accepted/tizen/6.5/unified/20211028.231830~1269 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a1f2ed008fb8bf0c938f05795d9f3af159e7d292;p=platform%2Fupstream%2Fpytorch.git 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 --- 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",