Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
06651c48
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2305
Star
20932
Fork
5423
代码
文件
提交
分支
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看板
未验证
提交
06651c48
编写于
8月 06, 2021
作者:
Z
Zeng Jinle
提交者:
GitHub
8月 06, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix ut test_pe_fix_op_run_order by using smaller model and batch size (#34603)
* fix ut * decrease gpu memory consumption * remove exclusive
上级
68377b44
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
3 addition
and
3 deletion
+3
-3
python/paddle/fluid/tests/unittests/test_parallel_executor_fix_op_run_order.py
...ests/unittests/test_parallel_executor_fix_op_run_order.py
+3
-3
未找到文件。
python/paddle/fluid/tests/unittests/test_parallel_executor_fix_op_run_order.py
浏览文件 @
06651c48
...
...
@@ -16,7 +16,7 @@ import paddle
import
paddle.fluid
as
fluid
import
unittest
import
numpy
as
np
from
paddle.vision.models
import
resnet
50
from
paddle.vision.models
import
resnet
18
from
paddle.nn
import
CrossEntropyLoss
...
...
@@ -33,7 +33,7 @@ class TestFixOpRunOrder(unittest.TestCase):
)
else
paddle
.
CPUPlace
()
def
get_feed
(
self
):
batch_size
=
32
batch_size
=
4
image
=
np
.
random
.
random
([
batch_size
,
3
,
224
,
224
]).
astype
(
'float32'
)
label
=
np
.
random
.
randint
(
0
,
1000
,
[
batch_size
,
1
]).
astype
(
'int64'
)
return
{
"image"
:
image
,
"label"
:
label
}
...
...
@@ -47,7 +47,7 @@ class TestFixOpRunOrder(unittest.TestCase):
name
=
"image"
,
shape
=
[
None
,
3
,
224
,
224
],
dtype
=
"float32"
)
label
=
paddle
.
static
.
data
(
name
=
"label"
,
shape
=
[
None
,
1
],
dtype
=
"int64"
)
model
=
resnet
50
()
model
=
resnet
18
()
pred
=
model
(
image
)
loss_fn
=
CrossEntropyLoss
()
loss
=
loss_fn
(
pred
,
label
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录