From eab61e87ce13cb5611a2f7a05779bfb20662a031 Mon Sep 17 00:00:00 2001 From: Zhang Lei Date: Tue, 12 May 2020 20:38:26 -0700 Subject: [PATCH] Fix quantization tool bugs when model nodes have no name. (#3854) Fix bugs when model nodes have no name. --- onnxruntime/python/tools/quantization/calibrate.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/onnxruntime/python/tools/quantization/calibrate.py b/onnxruntime/python/tools/quantization/calibrate.py index dc95cbabbb..1c633ec8e1 100644 --- a/onnxruntime/python/tools/quantization/calibrate.py +++ b/onnxruntime/python/tools/quantization/calibrate.py @@ -242,7 +242,9 @@ def main(): args = parser.parse_args() calibrate_op_types = args.op_types.split(',') black_nodes = args.black_nodes.split(',') + black_nodes = [x for x in black_nodes if x] white_nodes = args.white_nodes.split(',') + white_nodes = [x for x in white_nodes if x] model_path = args.model_path output_model_path = args.output_model_path images_folder = args.dataset_path