Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
a328da46
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a328da46
编写于
11月 28, 2016
作者:
G
gangliao
提交者:
GitHub
11月 28, 2016
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #640 from reyoung/feature/add_proto3
Add syntax='proto2' when using protobuf 3
上级
afe89eaf
5b4bec43
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
20 addition
and
2 deletion
+20
-2
proto/CMakeLists.txt
proto/CMakeLists.txt
+14
-1
proto/DataConfig.proto.m4
proto/DataConfig.proto.m4
+1
-0
proto/DataFormat.proto.m4
proto/DataFormat.proto.m4
+1
-0
proto/ModelConfig.proto.m4
proto/ModelConfig.proto.m4
+1
-0
proto/ParameterConfig.proto.m4
proto/ParameterConfig.proto.m4
+1
-0
proto/ParameterService.proto.m4
proto/ParameterService.proto.m4
+1
-1
proto/TrainerConfig.proto.m4
proto/TrainerConfig.proto.m4
+1
-0
未找到文件。
proto/CMakeLists.txt
浏览文件 @
a328da46
execute_process
(
COMMAND
${
PROTOBUF_PROTOC_EXECUTABLE
}
--version
OUTPUT_VARIABLE PROTOBUF_VERSION
)
string
(
REPLACE
"libprotoc "
""
PROTOBUF_VERSION
${
PROTOBUF_VERSION
}
)
set
(
PROTOBUF_3 OFF
)
if
(
${
PROTOBUF_VERSION
}
VERSION_GREATER
"3.0.0"
OR
${
PROTOBUF_VERSION
}
VERSION_EQUAL
"3.0.0"
)
set
(
PROTOBUF_3 ON
)
endif
()
set
(
proto_filenames
DataConfig.proto
DataFormat.proto
...
...
@@ -11,8 +20,12 @@ set(real_proto_files)
# TODO(yuyang18): Some internal proto will also be depended on.
# Find a way to automatically calculate all depends.
foreach
(
filename
${
proto_filenames
}
)
set
(
PROTOBUF_3_FLAGS
""
)
if
(
PROTOBUF_3
)
set
(
PROTOBUF_3_FLAGS
"-Dproto3"
)
endif
()
add_custom_command
(
OUTPUT
${
filename
}
COMMAND
${
M4_EXECUTABLE
}
-Dreal=
${
ACCURACY
}
-I '
${
INTERNAL_PROTO_PATH
}
'
COMMAND
${
M4_EXECUTABLE
}
-Dreal=
${
ACCURACY
}
${
PROTOBUF_3_FLAGS
}
-I '
${
INTERNAL_PROTO_PATH
}
'
${
PROJ_ROOT
}
/proto/
${
filename
}
.m4 >
${
filename
}
DEPENDS
${
PROJ_ROOT
}
/proto/
${
filename
}
.m4
COMMENT
"Generate
${
filename
}
"
)
...
...
proto/DataConfig.proto.m4
浏览文件 @
a328da46
...
...
@@ -11,6 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
See
the
License
for
the
specific
language
governing
permissions
and
limitations
under
the
License
.
*/
ifdef
(`
proto3
', `syntax = "proto2";'
)
package
paddle
;
...
...
proto/DataFormat.proto.m4
浏览文件 @
a328da46
...
...
@@ -11,6 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
See
the
License
for
the
specific
language
governing
permissions
and
limitations
under
the
License
.
*/
ifdef
(`
proto3
', `syntax = "proto2";'
)
package
paddle
;
...
...
proto/ModelConfig.proto.m4
浏览文件 @
a328da46
...
...
@@ -11,6 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
See
the
License
for
the
specific
language
governing
permissions
and
limitations
under
the
License
.
*/
ifdef
(`
proto3
', `syntax = "proto2";'
)
import
"ParameterConfig.proto"
;
...
...
proto/ParameterConfig.proto.m4
浏览文件 @
a328da46
...
...
@@ -11,6 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
See
the
License
for
the
specific
language
governing
permissions
and
limitations
under
the
License
.
*/
ifdef
(`
proto3
', `syntax = "proto2";'
)
package
paddle
;
...
...
proto/ParameterService.proto.m4
浏览文件 @
a328da46
...
...
@@ -11,6 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
See
the
License
for
the
specific
language
governing
permissions
and
limitations
under
the
License
.
*/
ifdef
(`
proto3
', `syntax = "proto2";'
)
import
"ParameterConfig.proto"
;
import
"TrainerConfig.proto"
;
...
...
@@ -20,7 +21,6 @@ package paddle;
/**
*
Various
structs
for
communicating
with
parameter
server
*/
enum
ParameterUpdateMode
{
//
Set
parameter
PSERVER_UPDATE_MODE_SET_PARAM
=
0
;//
use
local
param
...
...
proto/TrainerConfig.proto.m4
浏览文件 @
a328da46
...
...
@@ -11,6 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
See
the
License
for
the
specific
language
governing
permissions
and
limitations
under
the
License
.
*/
ifdef
(`
proto3
', `syntax = "proto2";'
)
import
"DataConfig.proto"
;
import
"ModelConfig.proto"
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录