Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
21ea2976
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
21ea2976
编写于
8月 21, 2020
作者:
C
Chen Weihang
提交者:
GitHub
8月 21, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix static dataloader default pin memory set (#26390)
* fix static dataloader default pin memory set * fix related unittests
上级
8c922931
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
5 addition
and
17 deletion
+5
-17
python/paddle/fluid/reader.py
python/paddle/fluid/reader.py
+1
-1
python/paddle/fluid/tests/unittests/test_decoupled_py_reader.py
.../paddle/fluid/tests/unittests/test_decoupled_py_reader.py
+2
-8
python/paddle/fluid/tests/unittests/test_generator_dataloader.py
...paddle/fluid/tests/unittests/test_generator_dataloader.py
+2
-8
未找到文件。
python/paddle/fluid/reader.py
浏览文件 @
21ea2976
...
@@ -1039,7 +1039,7 @@ class GeneratorLoader(DataLoaderBase):
...
@@ -1039,7 +1039,7 @@ class GeneratorLoader(DataLoaderBase):
self
.
_reader
=
core
.
create_py_reader
(
self
.
_reader
=
core
.
create_py_reader
(
self
.
queue
,
self
.
_var_names
,
self
.
_shapes
,
self
.
_dtypes
,
self
.
queue
,
self
.
_var_names
,
self
.
_shapes
,
self
.
_dtypes
,
self
.
_need_check_feed
,
self
.
_places
,
self
.
_use_double_buffer
,
self
.
_need_check_feed
,
self
.
_places
,
self
.
_use_double_buffer
,
self
.
_drop_last
,
Tru
e
)
self
.
_drop_last
,
Fals
e
)
def
_init_non_iterable
(
self
):
def
_init_non_iterable
(
self
):
lod_levels
=
[]
lod_levels
=
[]
...
...
python/paddle/fluid/tests/unittests/test_decoupled_py_reader.py
浏览文件 @
21ea2976
...
@@ -122,14 +122,8 @@ class TestBase(unittest.TestCase):
...
@@ -122,14 +122,8 @@ class TestBase(unittest.TestCase):
label
=
item
[
'label'
]
label
=
item
[
'label'
]
assert
image
.
shape
()
==
[
BATCH_SIZE
,
784
]
assert
image
.
shape
()
==
[
BATCH_SIZE
,
784
]
assert
label
.
shape
()
==
[
BATCH_SIZE
,
1
]
assert
label
.
shape
()
==
[
BATCH_SIZE
,
1
]
if
ps
[
i
].
_equals
(
fluid
.
CPUPlace
()):
assert
image
.
_place
().
_equals
(
ps
[
i
])
assert
image
.
_place
().
_equals
(
fluid
.
CPUPlace
())
assert
label
.
_place
().
_equals
(
ps
[
i
])
assert
label
.
_place
().
_equals
(
fluid
.
CPUPlace
())
else
:
assert
image
.
_place
().
_equals
(
fluid
.
CUDAPinnedPlace
())
assert
label
.
_place
().
_equals
(
fluid
.
CUDAPinnedPlace
())
L
,
=
exe
.
run
(
program
=
prog
,
L
,
=
exe
.
run
(
program
=
prog
,
feed
=
d
,
feed
=
d
,
fetch_list
=
[
loss
],
fetch_list
=
[
loss
],
...
...
python/paddle/fluid/tests/unittests/test_generator_dataloader.py
浏览文件 @
21ea2976
...
@@ -124,14 +124,8 @@ class TestBase(unittest.TestCase):
...
@@ -124,14 +124,8 @@ class TestBase(unittest.TestCase):
label
=
item
[
'label'
]
label
=
item
[
'label'
]
assert
image
.
shape
()
==
[
BATCH_SIZE
,
784
]
assert
image
.
shape
()
==
[
BATCH_SIZE
,
784
]
assert
label
.
shape
()
==
[
BATCH_SIZE
,
1
]
assert
label
.
shape
()
==
[
BATCH_SIZE
,
1
]
if
ps
[
i
].
_equals
(
fluid
.
CPUPlace
()):
assert
image
.
_place
().
_equals
(
ps
[
i
])
assert
image
.
_place
().
_equals
(
fluid
.
CPUPlace
())
assert
label
.
_place
().
_equals
(
ps
[
i
])
assert
label
.
_place
().
_equals
(
fluid
.
CPUPlace
())
else
:
assert
image
.
_place
().
_equals
(
fluid
.
CUDAPinnedPlace
())
assert
label
.
_place
().
_equals
(
fluid
.
CUDAPinnedPlace
())
L
,
=
exe
.
run
(
program
=
prog
,
L
,
=
exe
.
run
(
program
=
prog
,
feed
=
d
,
feed
=
d
,
fetch_list
=
[
loss
],
fetch_list
=
[
loss
],
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录