From bba0328f10da1c914ce68f708d03a60759316cc0 Mon Sep 17 00:00:00 2001 From: daquexian Date: Thu, 16 May 2019 22:00:40 +0800 Subject: [PATCH] Add extract_constant_to_initializer optimizer --- tools/onnx2bnn/OnnxConverter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/onnx2bnn/OnnxConverter.cpp b/tools/onnx2bnn/OnnxConverter.cpp index 87c349e..5a1b059 100644 --- a/tools/onnx2bnn/OnnxConverter.cpp +++ b/tools/onnx2bnn/OnnxConverter.cpp @@ -220,7 +220,8 @@ void OnnxConverter::Convert(const ONNX_NAMESPACE::ModelProto &model_proto, // Please check out "dabnn_*" pases in // https://github.com/daquexian/onnx/blob/optimizer_for_bnn/onnx/optimizer/passes // for details. - vector optimizers{"eliminate_nop_pad", "dabnn_bconv_strict"}; + vector optimizers{"eliminate_nop_pad", "extract_constant_to_initializer", + "dabnn_bconv_strict"}; if (level == Level::kModerate || level == Level::kAggressive) { optimizers.push_back("dabnn_bconv_moderate"); }