Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
db9e700b
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看板
提交
db9e700b
编写于
1月 25, 2019
作者:
D
Dun Liang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
default use pin place && test=develop
上级
aa88766a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
4 addition
and
18 deletion
+4
-18
paddle/fluid/API.spec
paddle/fluid/API.spec
+1
-1
python/paddle/fluid/layers/io.py
python/paddle/fluid/layers/io.py
+3
-17
未找到文件。
paddle/fluid/API.spec
浏览文件 @
db9e700b
...
...
@@ -218,7 +218,7 @@ paddle.fluid.layers.shuffle ArgSpec(args=['reader', 'buffer_size'], varargs=None
paddle.fluid.layers.batch ArgSpec(args=['reader', 'batch_size'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.double_buffer ArgSpec(args=['reader', 'place', 'name'], varargs=None, keywords=None, defaults=(None, None))
paddle.fluid.layers.random_data_generator ArgSpec(args=['low', 'high', 'shapes', 'lod_levels', 'for_parallel'], varargs=None, keywords=None, defaults=(True,))
paddle.fluid.layers.py_reader ArgSpec(args=['capacity', 'shapes', 'dtypes', 'lod_levels', 'name', 'use_double_buffer'
, 'use_cuda_pinned_place'], varargs=None, keywords=None, defaults=(None, None, True, Non
e))
paddle.fluid.layers.py_reader ArgSpec(args=['capacity', 'shapes', 'dtypes', 'lod_levels', 'name', 'use_double_buffer'
], varargs=None, keywords=None, defaults=(None, None, Tru
e))
paddle.fluid.layers.create_py_reader_by_data ArgSpec(args=['capacity', 'feed_list', 'name', 'use_double_buffer'], varargs=None, keywords=None, defaults=(None, True))
paddle.fluid.layers.Preprocessor.__init__ ArgSpec(args=['self', 'reader', 'name'], varargs=None, keywords=None, defaults=(None,))
paddle.fluid.layers.Preprocessor.block ArgSpec(args=[], varargs='args', keywords='kwds', defaults=None)
...
...
python/paddle/fluid/layers/io.py
浏览文件 @
db9e700b
...
...
@@ -483,9 +483,8 @@ def _py_reader(capacity,
lod_levels
=
None
,
name
=
None
,
use_double_buffer
=
True
,
use_cuda_pinned_place
=
False
,
feed_list
=
None
):
use_cuda_pinned_place
=
use_double_buffer
and
core
.
is_compiled_with_cuda
()
if
feed_list
is
not
None
:
if
not
isinstance
(
feed_list
,
list
):
raise
TypeError
(
"feed_list should be a list of Variable"
...
...
@@ -639,8 +638,7 @@ def py_reader(capacity,
dtypes
,
lod_levels
=
None
,
name
=
None
,
use_double_buffer
=
True
,
use_cuda_pinned_place
=
None
):
use_double_buffer
=
True
):
"""
Create a Python reader for data feeding in Python
...
...
@@ -664,9 +662,6 @@ def py_reader(capacity,
name(basestring): The prefix Python queue name and Reader name. None will
be generated automatically.
use_double_buffer(bool): Whether use double buffer or not.
use_cuda_pinned_place(bool): Whether use cuda pinned place or not,
this option only works with double buffer and cuda enabled.
None will be enabled when double buffer and cuda are enabled.
Returns:
Variable: A Reader from which we can get feeding data.
...
...
@@ -762,22 +757,13 @@ def py_reader(capacity,
>>> except fluid.core.EOFException:
>>> test_reader.reset()
"""
if
use_double_buffer
and
core
.
is_compiled_with_cuda
():
if
use_cuda_pinned_place
==
None
:
use_cuda_pinned_place
=
True
else
:
if
use_cuda_pinned_place
:
raise
RuntimeError
(
"use_cuda_pinned_place can only be used with double buffer and cuda enabled."
)
return
_py_reader
(
capacity
=
capacity
,
shapes
=
shapes
,
dtypes
=
dtypes
,
lod_levels
=
lod_levels
,
name
=
name
,
use_double_buffer
=
use_double_buffer
,
use_cuda_pinned_place
=
use_cuda_pinned_place
)
use_double_buffer
=
use_double_buffer
)
def
create_py_reader_by_data
(
capacity
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录