diff --git a/mace/core/net.cc b/mace/core/net.cc index e4bd4c37f1c7ead66bfa6c3b038ee2a434c91f0d..2766de115cfd8d745633f0ee182044010552fde6 100644 --- a/mace/core/net.cc +++ b/mace/core/net.cc @@ -29,7 +29,8 @@ NetBase::NetBase(const std::shared_ptr op_registry, const std::shared_ptr net_def, Workspace *ws, Device *device) - : name_(net_def->name()), op_registry_(op_registry) { + : op_registry_(op_registry) { + MACE_UNUSED(net_def); MACE_UNUSED(ws); MACE_UNUSED(device); } @@ -42,7 +43,7 @@ SerialNet::SerialNet( const NetMode mode) : NetBase(op_registry, net_def, ws, device), device_(device), op_kernel_context_(new OpKernelContext(ws, device)) { - MACE_LATENCY_LOGGER(1, "Constructing SerialNet ", net_def->name()); + MACE_LATENCY_LOGGER(1, "Constructing SerialNet"); DeviceType device_type = device->device_type(); for (int idx = 0; idx < net_def->op_size(); ++idx) { const auto &operator_def = net_def->op(idx); diff --git a/mace/core/net.h b/mace/core/net.h index 140eb8c42e80d64a96faddddac99524319c032a2..ecff907b739564f81e55b5f2bee0111cc52b3146 100644 --- a/mace/core/net.h +++ b/mace/core/net.h @@ -42,10 +42,7 @@ class NetBase { virtual MaceStatus Run(RunMetadata *run_metadata = nullptr) = 0; - const std::string &Name() const { return name_; } - protected: - std::string name_; const std::shared_ptr op_registry_; MACE_DISABLE_COPY_AND_ASSIGN(NetBase); diff --git a/mace/proto/mace.proto b/mace/proto/mace.proto index 0bf4c7da2c8b4d77dd042bd2c0c7a30cf183a942..11f2a88dac9247d913fbcd574b61ebb3ac46305d 100644 --- a/mace/proto/mace.proto +++ b/mace/proto/mace.proto @@ -116,11 +116,9 @@ message OutputInfo { } message NetDef { - optional string name = 1; - repeated OperatorDef op = 2; - optional string version = 3; - repeated Argument arg = 4; - repeated ConstTensor tensors = 5; + repeated OperatorDef op = 1; + repeated Argument arg = 2; + repeated ConstTensor tensors = 3; // for mem optimization optional MemoryArena mem_arena = 10; diff --git a/mace/python/tools/model.jinja2 b/mace/python/tools/model.jinja2 index 9e8c521b52082b4195117a4c42eb9000d1eb0140..3f4ba1c4f5d907352a0cee9bca719fa29be08768 100644 --- a/mace/python/tools/model.jinja2 +++ b/mace/python/tools/model.jinja2 @@ -146,8 +146,6 @@ const std::shared_ptr CreateNet() { MACE_LATENCY_LOGGER(1, "Create net {{ net.name }}"); std::shared_ptr net_def(new NetDef()); - net_def->set_name("{{ net.name}}"); - net_def->set_version("{{ net.version }}"); CreateOperators(net_def.get()); CreateTensors(net_def.get());