forked from mindspore-Ecosystem/mindspore
!4271 fix bug that same input tensor will repeat some times in graphIndex
Merge pull request !4271 from hangq/master
This commit is contained in:
commit
50bf46d4a6
3
build.sh
3
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 ..
|
||||
|
|
|
@ -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<std::string> 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue