From 931a005cce57938088f3906ff94d452d9805adea Mon Sep 17 00:00:00 2001 From: yejianwu Date: Tue, 22 May 2018 15:46:30 +0800 Subject: [PATCH] fix typo --- mace/core/mace.cc | 2 -- mace/python/tools/model.jinja2 | 2 -- mace/python/tools/model_header.jinja2 | 5 +++-- mace/python/tools/source_converter_lib.py | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/mace/core/mace.cc b/mace/core/mace.cc index 2a49c325..b2a08454 100644 --- a/mace/core/mace.cc +++ b/mace/core/mace.cc @@ -24,8 +24,6 @@ #include "mace/core/types.h" #include "mace/public/mace.h" - - #ifdef MACE_ENABLE_OPENCL #include "mace/core/runtime/opencl/opencl_runtime.h" #endif // MACE_ENABLE_OPENCL diff --git a/mace/python/tools/model.jinja2 b/mace/python/tools/model.jinja2 index ba2ca746..4aaf6e47 100644 --- a/mace/python/tools/model.jinja2 +++ b/mace/python/tools/model.jinja2 @@ -24,7 +24,6 @@ #include "mace/utils/logging.h" namespace mace { -{% if model_type == 'source' %} namespace {{tag}} { {% for i in range(net.tensors|length) %} @@ -133,7 +132,6 @@ void CreateMemoryArena(mace::MemoryArena *mem_arena) { } // namespace -{% endif %} namespace {{tag}} { diff --git a/mace/python/tools/model_header.jinja2 b/mace/python/tools/model_header.jinja2 index 98f956d1..28b1b545 100644 --- a/mace/python/tools/model_header.jinja2 +++ b/mace/python/tools/model_header.jinja2 @@ -24,11 +24,12 @@ namespace mace { namespace {{tag}} { -const unsigned char *LoadModelData(const char *model_data_file); + +const unsigned char *LoadModelData(const std::string &model_data_file); void UnloadModelData(const unsigned char *model_data); -NetDef CreateNet(); +const std::shared_ptr CreateNet(); const std::string ModelName(); diff --git a/mace/python/tools/source_converter_lib.py b/mace/python/tools/source_converter_lib.py index 93dcba0e..0fbf32fb 100644 --- a/mace/python/tools/source_converter_lib.py +++ b/mace/python/tools/source_converter_lib.py @@ -89,8 +89,7 @@ def convert_to_source(net_def, model_checksum, weight_checksum, template_dir, embed_model_data=embed_model_data, winograd_conv=winograd_conv, checksum=checksum, - build_time=build_time, - model_type=model_load_type) + build_time=build_time) with open(output, "wb") as f: f.write(source) -- GitLab