Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
Mace
提交
8f851c15
Mace
项目概览
慢慢CG
/
Mace
与 Fork 源项目一致
Fork自
Xiaomi / Mace
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Mace
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
8f851c15
编写于
10月 12, 2018
作者:
Y
yejianwu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove name and version in NetDef in mace.proto
上级
3183be4d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
6 addition
and
12 deletion
+6
-12
mace/core/net.cc
mace/core/net.cc
+3
-2
mace/core/net.h
mace/core/net.h
+0
-3
mace/proto/mace.proto
mace/proto/mace.proto
+3
-5
mace/python/tools/model.jinja2
mace/python/tools/model.jinja2
+0
-2
未找到文件。
mace/core/net.cc
浏览文件 @
8f851c15
...
@@ -29,7 +29,8 @@ NetBase::NetBase(const std::shared_ptr<const OperatorRegistryBase> op_registry,
...
@@ -29,7 +29,8 @@ NetBase::NetBase(const std::shared_ptr<const OperatorRegistryBase> op_registry,
const
std
::
shared_ptr
<
const
NetDef
>
net_def
,
const
std
::
shared_ptr
<
const
NetDef
>
net_def
,
Workspace
*
ws
,
Workspace
*
ws
,
Device
*
device
)
Device
*
device
)
:
name_
(
net_def
->
name
()),
op_registry_
(
op_registry
)
{
:
op_registry_
(
op_registry
)
{
MACE_UNUSED
(
net_def
);
MACE_UNUSED
(
ws
);
MACE_UNUSED
(
ws
);
MACE_UNUSED
(
device
);
MACE_UNUSED
(
device
);
}
}
...
@@ -42,7 +43,7 @@ SerialNet::SerialNet(
...
@@ -42,7 +43,7 @@ SerialNet::SerialNet(
const
NetMode
mode
)
const
NetMode
mode
)
:
NetBase
(
op_registry
,
net_def
,
ws
,
device
),
device_
(
device
),
:
NetBase
(
op_registry
,
net_def
,
ws
,
device
),
device_
(
device
),
op_kernel_context_
(
new
OpKernelContext
(
ws
,
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
();
DeviceType
device_type
=
device
->
device_type
();
for
(
int
idx
=
0
;
idx
<
net_def
->
op_size
();
++
idx
)
{
for
(
int
idx
=
0
;
idx
<
net_def
->
op_size
();
++
idx
)
{
const
auto
&
operator_def
=
net_def
->
op
(
idx
);
const
auto
&
operator_def
=
net_def
->
op
(
idx
);
...
...
mace/core/net.h
浏览文件 @
8f851c15
...
@@ -37,10 +37,7 @@ class NetBase {
...
@@ -37,10 +37,7 @@ class NetBase {
virtual
MaceStatus
Run
(
RunMetadata
*
run_metadata
=
nullptr
)
=
0
;
virtual
MaceStatus
Run
(
RunMetadata
*
run_metadata
=
nullptr
)
=
0
;
const
std
::
string
&
Name
()
const
{
return
name_
;
}
protected:
protected:
std
::
string
name_
;
const
std
::
shared_ptr
<
const
OperatorRegistryBase
>
op_registry_
;
const
std
::
shared_ptr
<
const
OperatorRegistryBase
>
op_registry_
;
MACE_DISABLE_COPY_AND_ASSIGN
(
NetBase
);
MACE_DISABLE_COPY_AND_ASSIGN
(
NetBase
);
...
...
mace/proto/mace.proto
浏览文件 @
8f851c15
...
@@ -116,11 +116,9 @@ message OutputInfo {
...
@@ -116,11 +116,9 @@ message OutputInfo {
}
}
message
NetDef
{
message
NetDef
{
optional
string
name
=
1
;
repeated
OperatorDef
op
=
1
;
repeated
OperatorDef
op
=
2
;
repeated
Argument
arg
=
2
;
optional
string
version
=
3
;
repeated
ConstTensor
tensors
=
3
;
repeated
Argument
arg
=
4
;
repeated
ConstTensor
tensors
=
5
;
// for mem optimization
// for mem optimization
optional
MemoryArena
mem_arena
=
10
;
optional
MemoryArena
mem_arena
=
10
;
...
...
mace/python/tools/model.jinja2
浏览文件 @
8f851c15
...
@@ -146,8 +146,6 @@ const std::shared_ptr<NetDef> CreateNet() {
...
@@ -146,8 +146,6 @@ const std::shared_ptr<NetDef> CreateNet() {
MACE_LATENCY_LOGGER(1, "Create net {{ net.name }}");
MACE_LATENCY_LOGGER(1, "Create net {{ net.name }}");
std::shared_ptr<NetDef> net_def(new NetDef());
std::shared_ptr<NetDef> net_def(new NetDef());
net_def->set_name("{{ net.name}}");
net_def->set_version("{{ net.version }}");
CreateOperators(net_def.get());
CreateOperators(net_def.get());
CreateTensors(net_def.get());
CreateTensors(net_def.get());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录