Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
ab279bee
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ab279bee
编写于
2月 05, 2017
作者:
Y
Yi Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove completely create_data_config_proto
上级
996b1de1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
2 addition
and
25 deletion
+2
-25
python/paddle/trainer/config_parser.py
python/paddle/trainer/config_parser.py
+0
-24
python/paddle/trainer_config_helpers/data_sources.py
python/paddle/trainer_config_helpers/data_sources.py
+2
-1
未找到文件。
python/paddle/trainer/config_parser.py
浏览文件 @
ab279bee
...
@@ -894,30 +894,6 @@ class MaxOut(Cfg):
...
@@ -894,30 +894,6 @@ class MaxOut(Cfg):
self
.
add_keys
(
locals
())
self
.
add_keys
(
locals
())
def
create_data_config_proto
(
async_load_data
=
False
,
constant_slots
=
None
,
data_ratio
=
1
,
is_main_data
=
True
,
usage_ratio
=
None
):
# default: all sub dataproviders are treat as "main data".
# see proto/DataConfig.proto for is_main_data
data_config
=
DataConfig
()
data_config
.
async_load_data
=
async_load_data
if
constant_slots
:
data_config
.
constant_slots
.
extend
(
constant_slots
)
data_config
.
data_ratio
=
data_ratio
data_config
.
is_main_data
=
is_main_data
usage_ratio
=
default
(
usage_ratio
,
settings_deprecated
[
"usage_ratio"
])
config_assert
(
usage_ratio
>=
0
and
usage_ratio
<=
1
,
"The range of usage_ratio is [0, 1]"
)
data_config
.
usage_ratio
=
usage_ratio
return
data_config
@
config_func
@
config_func
def
SimpleData
(
files
=
None
,
def
SimpleData
(
files
=
None
,
feat_dim
=
None
,
feat_dim
=
None
,
...
...
python/paddle/trainer_config_helpers/data_sources.py
浏览文件 @
ab279bee
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
"""
"""
Data Sources are helpers to define paddle training data or testing data.
Data Sources are helpers to define paddle training data or testing data.
"""
"""
import
paddle.proto.DataConfig_pb2
from
paddle.trainer.config_parser
import
*
from
paddle.trainer.config_parser
import
*
from
.utils
import
deprecated
from
.utils
import
deprecated
...
@@ -195,7 +196,7 @@ def define_py_data_sources2(train_list, test_list, module, obj, args=None):
...
@@ -195,7 +196,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
=
create_data_config_proto
()
data
=
paddle
.
proto
.
DataConfig_pb2
.
DataConfig
()
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录