diff --git a/mace/core/net.cc b/mace/core/net.cc index faa4e1d3728ec8783f554f7b50f65111d2e462ad..f38c611662bcd175b1989fddb8dceaa38fa05d74 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 a63ded668e582e46d0d8a60b492478797a514cd5..7f8094fc3afee310526dc5dc6a7db69a548ceb7e 100644 --- a/mace/core/net.h +++ b/mace/core/net.h @@ -37,10 +37,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());