Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
ccb553fe
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 2 年 前同步成功
通知
2325
Star
20933
Fork
5424
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ccb553fe
编写于
2月 04, 2017
作者:
W
wangkuiyi
提交者:
GitHub
2月 04, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request
#1253
from wangkuiyi/python_learning_and_refactor
Rename Python function DataBase into create_data_config_proto
上级
ed808f5e
b8f3a5c4
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
20 addition
and
20 deletion
+20
-20
python/paddle/trainer/config_parser.py
python/paddle/trainer/config_parser.py
+9
-9
python/paddle/trainer_config_helpers/data_sources.py
python/paddle/trainer_config_helpers/data_sources.py
+11
-11
未找到文件。
python/paddle/trainer/config_parser.py
浏览文件 @
ccb553fe
...
@@ -893,7 +893,7 @@ class MaxOut(Cfg):
...
@@ -893,7 +893,7 @@ class MaxOut(Cfg):
self
.
add_keys
(
locals
())
self
.
add_keys
(
locals
())
def
DataBase
(
async_load_data
=
False
,
def
create_data_config_proto
(
async_load_data
=
False
,
constant_slots
=
None
,
constant_slots
=
None
,
data_ratio
=
1
,
data_ratio
=
1
,
is_main_data
=
True
,
is_main_data
=
True
,
...
@@ -923,7 +923,7 @@ def SimpleData(files=None,
...
@@ -923,7 +923,7 @@ def SimpleData(files=None,
context_len
=
None
,
context_len
=
None
,
buffer_capacity
=
None
,
buffer_capacity
=
None
,
**
xargs
):
**
xargs
):
data_config
=
DataBase
(
**
xargs
)
data_config
=
create_data_config_proto
(
**
xargs
)
data_config
.
type
=
'simple'
data_config
.
type
=
'simple'
data_config
.
files
=
files
data_config
.
files
=
files
data_config
.
feat_dim
=
feat_dim
data_config
.
feat_dim
=
feat_dim
...
@@ -945,7 +945,7 @@ def PyData(files=None,
...
@@ -945,7 +945,7 @@ def PyData(files=None,
constant_slots
=
None
,
constant_slots
=
None
,
load_thread_num
=
None
,
load_thread_num
=
None
,
**
xargs
):
**
xargs
):
data_config
=
DataBase
(
**
xargs
)
data_config
=
create_data_config_proto
(
**
xargs
)
data_config
.
type
=
'py'
data_config
.
type
=
'py'
if
load_data_module
in
g_py_module_name_list
:
if
load_data_module
in
g_py_module_name_list
:
...
@@ -996,7 +996,7 @@ def ProtoData(files=None,
...
@@ -996,7 +996,7 @@ def ProtoData(files=None,
constant_slots
=
None
,
constant_slots
=
None
,
load_thread_num
=
None
,
load_thread_num
=
None
,
**
xargs
):
**
xargs
):
data_config
=
DataBase
(
**
xargs
)
data_config
=
create_data_config_proto
(
**
xargs
)
if
type
is
None
:
if
type
is
None
:
data_config
.
type
=
'proto'
data_config
.
type
=
'proto'
else
:
else
:
...
@@ -1035,7 +1035,7 @@ def Data(type,
...
@@ -1035,7 +1035,7 @@ def Data(type,
buffer_capacity
=
None
,
buffer_capacity
=
None
,
**
xargs
):
**
xargs
):
data_config
=
DataBase
(
**
xargs
)
data_config
=
create_data_config_proto
(
**
xargs
)
data_config
.
type
=
type
data_config
.
type
=
type
data_config
.
files
=
files
data_config
.
files
=
files
data_config
.
feat_dim
=
feat_dim
data_config
.
feat_dim
=
feat_dim
...
...
python/paddle/trainer_config_helpers/data_sources.py
浏览文件 @
ccb553fe
...
@@ -195,7 +195,7 @@ def define_py_data_sources2(train_list, test_list, module, obj, args=None):
...
@@ -195,7 +195,7 @@ def define_py_data_sources2(train_list, test_list, module, obj, args=None):
def
py_data2
(
files
,
load_data_module
,
load_data_object
,
load_data_args
,
def
py_data2
(
files
,
load_data_module
,
load_data_object
,
load_data_args
,
**
kwargs
):
**
kwargs
):
data
=
DataBase
()
data
=
create_data_config_proto
()
data
.
type
=
'py2'
data
.
type
=
'py2'
data
.
files
=
files
data
.
files
=
files
data
.
load_data_module
=
load_data_module
data
.
load_data_module
=
load_data_module
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录