From d258e53d06c529b7bd88f98c585216a85f8bb35b Mon Sep 17 00:00:00 2001 From: Bin Li Date: Thu, 11 Apr 2019 10:31:43 +0800 Subject: [PATCH] Fix post train quantize --- .gitlab-ci.yml | 4 ++-- mace/python/tools/converter_tool/transformer.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a574449d..4fb6d388 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -151,7 +151,7 @@ model_tests: python tools/converter.py run --config=${CONF_FILE} --target_socs=$TARGET_SOCS --round=1 --validate --model_graph_format=code --model_data_format=file || exit 1; python tools/converter.py run --config=${CONF_FILE} --target_socs=$TARGET_SOCS --example --round=1 --validate --model_graph_format=code --model_data_format=file || exit 1; python tools/converter.py benchmark --config=${CONF_FILE} --target_socs=$TARGET_SOCS --round=5 --model_graph_format=code --model_data_format=file || exit 1; - + - rm -rf mace-models quantization_tests: @@ -167,7 +167,7 @@ quantization_tests: fi - if [ -z "$TARGET_SOCS" ]; then TARGET_SOCS=random; fi - > - for CONF_FILE in mace-models/mobilenet-v1/mobilenet-v1-quantize-retrain.yml mace-models/mobilenet-v1/mobilenet-v1-quantize-retrain-for-check-only.yml mace-models/mobilenet-v1/mobilenet-v1-quantize-retrain-dsp.yml; + for CONF_FILE in mace-models/mobilenet-v1/mobilenet-v1-quantize-friendly.yml mace-models/mobilenet-v1/mobilenet-v1-quantize-retrain-for-check-only.yml mace-models/mobilenet-v1/mobilenet-v1-quantize-retrain-dsp.yml; do python tools/converter.py convert --config=${CONF_FILE} --target_socs=$TARGET_SOCS --model_graph_format=file --model_data_format=file || exit 1; python tools/converter.py run --config=${CONF_FILE} --target_socs=$TARGET_SOCS --device_yml=${DEVICE_CONF_FILE} --round=1 --validate --model_graph_format=file --model_data_format=file || exit 1; diff --git a/mace/python/tools/converter_tool/transformer.py b/mace/python/tools/converter_tool/transformer.py index 437fe91e..e654a8fb 100644 --- a/mace/python/tools/converter_tool/transformer.py +++ b/mace/python/tools/converter_tool/transformer.py @@ -1713,8 +1713,8 @@ class Transformer(base_converter.ConverterInterface): mace_check(output in self._quantize_activation_info, "%s does not have quantize activation info" % op) - op.quantize_info.append( - self._quantize_activation_info[output]) + op.quantize_info.extend([ + self._quantize_activation_info[output]]) if not self._option.quantize: return False -- GitLab