diff --git a/build.sh b/build.sh index 25ba93071c5..82a566d77f4 100755 --- a/build.sh +++ b/build.sh @@ -682,8 +682,7 @@ build_lite() cp ${BASEPATH}/mindspore/lite/build/src/libmindspore-lite.so ${OUTPUT_DIR}/lib/ mkdir -p ${OUTPUT_DIR}/third_party/protobuf/lib cp -r ${BASEPATH}/third_party/protobuf/build/include/ ${OUTPUT_DIR}/third_party/protobuf/ - cp -r ${BASEPATH}/third_party/protobuf/build/lib/libprotobuf.so.19 ${OUTPUT_DIR}/third_party/protobuf/lib/ - cp -r ${BASEPATH}/third_party/protobuf/build/lib/libprotobuf.so.19.0.0 ${OUTPUT_DIR}/third_party/protobuf/lib/ + cp -r ${BASEPATH}/third_party/protobuf/build/lib/libprotobuf.so.19.0.0 ${OUTPUT_DIR}/third_party/protobuf/lib/libprotobuf.so.19 mkdir -p ${OUTPUT_DIR}/third_party/flatbuffers cp -r ${BASEPATH}/third_party/flatbuffers/include/ ${OUTPUT_DIR}/third_party/flatbuffers/ cd .. diff --git a/mindspore/lite/src/common/anf_exporter/anf_exporter.cc b/mindspore/lite/src/common/anf_exporter/anf_exporter.cc index db50b02825a..a28d40d7d4a 100644 --- a/mindspore/lite/src/common/anf_exporter/anf_exporter.cc +++ b/mindspore/lite/src/common/anf_exporter/anf_exporter.cc @@ -29,6 +29,7 @@ #include "src/ir/primitive_t_value.h" #include "src/ir/tensor.h" #include "src/param_value_lite.h" +#include "src/common/utils.h" namespace mindspore::lite { std::set RemoveNodeInAnfExporter{"tuple_getitem", "make_tuple"}; @@ -249,8 +250,9 @@ schema::MetaGraphT *AnfExporter::Export(const FuncGraphPtr &funcGraph) { if (tensor->data.empty()) { tensor->nodeType = schema::NodeType_ValueNode; tensor->format = schema::Format_NHWC; - // tensor->refCount = lite::MSCONST_WEIGHT_REFCOUNT; - metaGraphT->inputIndex.emplace_back(input); + if (!IsContain(metaGraphT->inputIndex, input)) { + metaGraphT->inputIndex.emplace_back(input); + } } } }