提交 adb4a9b4 编写于 作者: B Bin Li

Support HTA code/code

上级 fbd0ff09
......@@ -168,6 +168,13 @@ quantization_tests:
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;
done
- >
CONF_FILE=mace-models/mobilenet-v1/mobilenet-v1-quantize-retrain-hta.yml;
GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" git clone --single-branch --branch hta git@v9.git.n.xiaomi.com:deep-computing/mace.git mace_hta --depth 1;
mv mace_hta/third_party/hta/ third_party/;
python tools/converter.py convert --config=${CONF_FILE} --model_graph_format=file --model_data_format=file || exit 1;
python tools/converter.py run --config=${CONF_FILE} --round=1 --validate --model_graph_format=file --model_data_format=file || exit 1;
rm -rf mace_hta third_party/hta;
- rm -rf mace-models
dynamic_linking_test:
......
......@@ -19,7 +19,6 @@
#include <string>
#include <vector>
#include "mace/core/op_context.h"
#include "mace/core/quantize.h"
#include "mace/core/tensor.h"
#include "mace/core/types.h"
......
......@@ -138,7 +138,7 @@ void CreateOperator{{i}}(mace::OperatorDef *op) {
quantize_info{{j}}->set_maxval({{ net.op[i].quantize_info[j].maxval }});
{% endfor %}
{% if device == 3 %}
{% if device == 3 or device == 4 %}
op->set_padding({{ net.op[i].padding }});
{% if net.op[i].node_input | length > 0 %}
std::vector<int> input_node_ids({ {{ net.op[i].node_input | map(attribute='node_id') | join(', ') }} });
......
......@@ -138,7 +138,7 @@ void CreateOperator{{i}}(mace::OperatorDef *op) {
quantize_info{{j}}->set_maxval({{ net.op[i].quantize_info[j].maxval }});
{% endfor %}
{% if device == 3 %}
{% if device == 3 or device == 4 %}
op->set_padding({{ net.op[i].padding }});
{% if net.op[i].node_input | length > 0 %}
std::vector<int> input_node_ids({ {{ net.op[i].node_input | map(attribute='node_id') | join(', ') }} });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册