Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleHub
提交
b43e0aa3
P
PaddleHub
项目概览
PaddlePaddle
/
PaddleHub
1 年多 前同步成功
通知
283
Star
12117
Fork
2091
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
200
列表
看板
标记
里程碑
合并请求
4
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleHub
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
200
Issue
200
列表
看板
标记
里程碑
合并请求
4
合并请求
4
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b43e0aa3
编写于
1月 04, 2019
作者:
W
wuzewu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add proto message to save parameter data
上级
ff0a843f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
99 addition
and
9 deletion
+99
-9
paddle_hub/module_desc.proto
paddle_hub/module_desc.proto
+6
-0
paddle_hub/module_desc_pb2.py
paddle_hub/module_desc_pb2.py
+93
-9
未找到文件。
paddle_hub/module_desc.proto
浏览文件 @
b43e0aa3
...
@@ -26,6 +26,12 @@ message OutputDesc {
...
@@ -26,6 +26,12 @@ message OutputDesc {
repeated
string
name
=
1
;
repeated
string
name
=
1
;
};
};
message
Parameter
{
string
name
=
1
;
double
learning_rate
=
2
;
bool
trainable
=
3
;
};
// A Hub Module is stored in a directory with a file 'paddlehub.pb'
// A Hub Module is stored in a directory with a file 'paddlehub.pb'
// containing a serialized protocol message of this type. The further contents
// containing a serialized protocol message of this type. The further contents
// of the directory depend on the storage format described by the message.
// of the directory depend on the storage format described by the message.
...
...
paddle_hub/module_desc_pb2.py
浏览文件 @
b43e0aa3
...
@@ -17,7 +17,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
...
@@ -17,7 +17,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
package
=
'paddle_hub'
,
package
=
'paddle_hub'
,
syntax
=
'proto3'
,
syntax
=
'proto3'
,
serialized_pb
=
_b
(
serialized_pb
=
_b
(
'
\n\x11
module_desc.proto
\x12\n
paddle_hub
\"\x19\n\t
InputDesc
\x12\x0c\n\x04
name
\x18\x01
\x03
(
\t\"\x1a\n\n
OutputDesc
\x12\x0c\n\x04
name
\x18\x01
\x03
(
\t\"\xd8\x02\n\n
ModuleDesc
\x12\x0c\n\x04
name
\x18\x01
\x01
(
\t\x12
:
\n\n
sign2input
\x18\x02
\x03
(
\x0b\x32
&.paddle_hub.ModuleDesc.Sign2inputEntry
\x12
<
\n\x0b
sign2output
\x18\x03
\x03
(
\x0b\x32\'
.paddle_hub.ModuleDesc.Sign2outputEntry
\x12\x14\n\x0c
return_numpy
\x18\x04
\x01
(
\x08\x12\x16\n\x0e\x63
ontain_assets
\x18\x05
\x01
(
\x08\x1a
H
\n\x0f
Sign2inputEntry
\x12\x0b\n\x03
key
\x18\x01
\x01
(
\t\x12
$
\n\x05
value
\x18\x02
\x01
(
\x0b\x32\x15
.paddle_hub.InputDesc:
\x02\x38\x01\x1a
J
\n\x10
Sign2outputEntry
\x12\x0b\n\x03
key
\x18\x01
\x01
(
\t\x12
%
\n\x05
value
\x18\x02
\x01
(
\x0b\x32\x16
.paddle_hub.OutputDesc:
\x02\x38\x01\x42\x02
H
\x03\x62\x06
proto3'
'
\n\x11
module_desc.proto
\x12\n
paddle_hub
\"\x19\n\t
InputDesc
\x12\x0c\n\x04
name
\x18\x01
\x03
(
\t\"\x1a\n\n
OutputDesc
\x12\x0c\n\x04
name
\x18\x01
\x03
(
\t\"
C
\n\t
Parameter
\x12\x0c\n\x04
name
\x18\x01
\x01
(
\t\x12\x15\n\r
learning_rate
\x18\x02
\x01
(
\x01\x12\x11\n\t
trainable
\x18\x03
\x01
(
\x08\"
\xd8\x02\n\n
ModuleDesc
\x12\x0c\n\x04
name
\x18\x01
\x01
(
\t\x12
:
\n\n
sign2input
\x18\x02
\x03
(
\x0b\x32
&.paddle_hub.ModuleDesc.Sign2inputEntry
\x12
<
\n\x0b
sign2output
\x18\x03
\x03
(
\x0b\x32\'
.paddle_hub.ModuleDesc.Sign2outputEntry
\x12\x14\n\x0c
return_numpy
\x18\x04
\x01
(
\x08\x12\x16\n\x0e\x63
ontain_assets
\x18\x05
\x01
(
\x08\x1a
H
\n\x0f
Sign2inputEntry
\x12\x0b\n\x03
key
\x18\x01
\x01
(
\t\x12
$
\n\x05
value
\x18\x02
\x01
(
\x0b\x32\x15
.paddle_hub.InputDesc:
\x02\x38\x01\x1a
J
\n\x10
Sign2outputEntry
\x12\x0b\n\x03
key
\x18\x01
\x01
(
\t\x12
%
\n\x05
value
\x18\x02
\x01
(
\x0b\x32\x16
.paddle_hub.OutputDesc:
\x02\x38\x01\x42\x02
H
\x03\x62\x06
proto3'
))
))
_sym_db
.
RegisterFileDescriptor
(
DESCRIPTOR
)
_sym_db
.
RegisterFileDescriptor
(
DESCRIPTOR
)
...
@@ -54,7 +54,8 @@ _INPUTDESC = _descriptor.Descriptor(
...
@@ -54,7 +54,8 @@ _INPUTDESC = _descriptor.Descriptor(
extension_ranges
=
[],
extension_ranges
=
[],
oneofs
=
[],
oneofs
=
[],
serialized_start
=
33
,
serialized_start
=
33
,
serialized_end
=
58
,
)
serialized_end
=
58
,
)
_OUTPUTDESC
=
_descriptor
.
Descriptor
(
_OUTPUTDESC
=
_descriptor
.
Descriptor
(
name
=
'OutputDesc'
,
name
=
'OutputDesc'
,
...
@@ -89,7 +90,76 @@ _OUTPUTDESC = _descriptor.Descriptor(
...
@@ -89,7 +90,76 @@ _OUTPUTDESC = _descriptor.Descriptor(
extension_ranges
=
[],
extension_ranges
=
[],
oneofs
=
[],
oneofs
=
[],
serialized_start
=
60
,
serialized_start
=
60
,
serialized_end
=
86
,
)
serialized_end
=
86
,
)
_PARAMETER
=
_descriptor
.
Descriptor
(
name
=
'Parameter'
,
full_name
=
'paddle_hub.Parameter'
,
filename
=
None
,
file
=
DESCRIPTOR
,
containing_type
=
None
,
fields
=
[
_descriptor
.
FieldDescriptor
(
name
=
'name'
,
full_name
=
'paddle_hub.Parameter.name'
,
index
=
0
,
number
=
1
,
type
=
9
,
cpp_type
=
9
,
label
=
1
,
has_default_value
=
False
,
default_value
=
_b
(
""
).
decode
(
'utf-8'
),
message_type
=
None
,
enum_type
=
None
,
containing_type
=
None
,
is_extension
=
False
,
extension_scope
=
None
,
options
=
None
),
_descriptor
.
FieldDescriptor
(
name
=
'learning_rate'
,
full_name
=
'paddle_hub.Parameter.learning_rate'
,
index
=
1
,
number
=
2
,
type
=
1
,
cpp_type
=
5
,
label
=
1
,
has_default_value
=
False
,
default_value
=
float
(
0
),
message_type
=
None
,
enum_type
=
None
,
containing_type
=
None
,
is_extension
=
False
,
extension_scope
=
None
,
options
=
None
),
_descriptor
.
FieldDescriptor
(
name
=
'trainable'
,
full_name
=
'paddle_hub.Parameter.trainable'
,
index
=
2
,
number
=
3
,
type
=
8
,
cpp_type
=
7
,
label
=
1
,
has_default_value
=
False
,
default_value
=
False
,
message_type
=
None
,
enum_type
=
None
,
containing_type
=
None
,
is_extension
=
False
,
extension_scope
=
None
,
options
=
None
),
],
extensions
=
[],
nested_types
=
[],
enum_types
=
[],
options
=
None
,
is_extendable
=
False
,
syntax
=
'proto3'
,
extension_ranges
=
[],
oneofs
=
[],
serialized_start
=
88
,
serialized_end
=
155
,
)
_MODULEDESC_SIGN2INPUTENTRY
=
_descriptor
.
Descriptor
(
_MODULEDESC_SIGN2INPUTENTRY
=
_descriptor
.
Descriptor
(
name
=
'Sign2inputEntry'
,
name
=
'Sign2inputEntry'
,
...
@@ -140,8 +210,9 @@ _MODULEDESC_SIGN2INPUTENTRY = _descriptor.Descriptor(
...
@@ -140,8 +210,9 @@ _MODULEDESC_SIGN2INPUTENTRY = _descriptor.Descriptor(
syntax
=
'proto3'
,
syntax
=
'proto3'
,
extension_ranges
=
[],
extension_ranges
=
[],
oneofs
=
[],
oneofs
=
[],
serialized_start
=
285
,
serialized_start
=
354
,
serialized_end
=
357
,
)
serialized_end
=
426
,
)
_MODULEDESC_SIGN2OUTPUTENTRY
=
_descriptor
.
Descriptor
(
_MODULEDESC_SIGN2OUTPUTENTRY
=
_descriptor
.
Descriptor
(
name
=
'Sign2outputEntry'
,
name
=
'Sign2outputEntry'
,
...
@@ -192,8 +263,9 @@ _MODULEDESC_SIGN2OUTPUTENTRY = _descriptor.Descriptor(
...
@@ -192,8 +263,9 @@ _MODULEDESC_SIGN2OUTPUTENTRY = _descriptor.Descriptor(
syntax
=
'proto3'
,
syntax
=
'proto3'
,
extension_ranges
=
[],
extension_ranges
=
[],
oneofs
=
[],
oneofs
=
[],
serialized_start
=
359
,
serialized_start
=
428
,
serialized_end
=
433
,
)
serialized_end
=
502
,
)
_MODULEDESC
=
_descriptor
.
Descriptor
(
_MODULEDESC
=
_descriptor
.
Descriptor
(
name
=
'ModuleDesc'
,
name
=
'ModuleDesc'
,
...
@@ -294,8 +366,9 @@ _MODULEDESC = _descriptor.Descriptor(
...
@@ -294,8 +366,9 @@ _MODULEDESC = _descriptor.Descriptor(
syntax
=
'proto3'
,
syntax
=
'proto3'
,
extension_ranges
=
[],
extension_ranges
=
[],
oneofs
=
[],
oneofs
=
[],
serialized_start
=
89
,
serialized_start
=
158
,
serialized_end
=
433
,
)
serialized_end
=
502
,
)
_MODULEDESC_SIGN2INPUTENTRY
.
fields_by_name
[
'value'
].
message_type
=
_INPUTDESC
_MODULEDESC_SIGN2INPUTENTRY
.
fields_by_name
[
'value'
].
message_type
=
_INPUTDESC
_MODULEDESC_SIGN2INPUTENTRY
.
containing_type
=
_MODULEDESC
_MODULEDESC_SIGN2INPUTENTRY
.
containing_type
=
_MODULEDESC
...
@@ -307,6 +380,7 @@ _MODULEDESC.fields_by_name[
...
@@ -307,6 +380,7 @@ _MODULEDESC.fields_by_name[
'sign2output'
].
message_type
=
_MODULEDESC_SIGN2OUTPUTENTRY
'sign2output'
].
message_type
=
_MODULEDESC_SIGN2OUTPUTENTRY
DESCRIPTOR
.
message_types_by_name
[
'InputDesc'
]
=
_INPUTDESC
DESCRIPTOR
.
message_types_by_name
[
'InputDesc'
]
=
_INPUTDESC
DESCRIPTOR
.
message_types_by_name
[
'OutputDesc'
]
=
_OUTPUTDESC
DESCRIPTOR
.
message_types_by_name
[
'OutputDesc'
]
=
_OUTPUTDESC
DESCRIPTOR
.
message_types_by_name
[
'Parameter'
]
=
_PARAMETER
DESCRIPTOR
.
message_types_by_name
[
'ModuleDesc'
]
=
_MODULEDESC
DESCRIPTOR
.
message_types_by_name
[
'ModuleDesc'
]
=
_MODULEDESC
InputDesc
=
_reflection
.
GeneratedProtocolMessageType
(
InputDesc
=
_reflection
.
GeneratedProtocolMessageType
(
...
@@ -329,6 +403,16 @@ OutputDesc = _reflection.GeneratedProtocolMessageType(
...
@@ -329,6 +403,16 @@ OutputDesc = _reflection.GeneratedProtocolMessageType(
))
))
_sym_db
.
RegisterMessage
(
OutputDesc
)
_sym_db
.
RegisterMessage
(
OutputDesc
)
Parameter
=
_reflection
.
GeneratedProtocolMessageType
(
'Parameter'
,
(
_message
.
Message
,
),
dict
(
DESCRIPTOR
=
_PARAMETER
,
__module__
=
'module_desc_pb2'
# @@protoc_insertion_point(class_scope:paddle_hub.Parameter)
))
_sym_db
.
RegisterMessage
(
Parameter
)
ModuleDesc
=
_reflection
.
GeneratedProtocolMessageType
(
ModuleDesc
=
_reflection
.
GeneratedProtocolMessageType
(
'ModuleDesc'
,
'ModuleDesc'
,
(
_message
.
Message
,
),
(
_message
.
Message
,
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录