Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
33fa2684
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看板
未验证
提交
33fa2684
编写于
12月 07, 2022
作者:
姜
姜永久
提交者:
GitHub
12月 08, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rm dygraph_to_static eager guard tests part2 minst2ptb_lm (#48793)
* rm dygraph_to_static eager guard tests part2 minst2ptb_lm
上级
b8c66889
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
6 addition
and
26 deletion
+6
-26
python/paddle/fluid/tests/unittests/dygraph_to_static/test_mnist.py
...dle/fluid/tests/unittests/dygraph_to_static/test_mnist.py
+0
-12
python/paddle/fluid/tests/unittests/dygraph_to_static/test_mnist_amp.py
...fluid/tests/unittests/dygraph_to_static/test_mnist_amp.py
+1
-2
python/paddle/fluid/tests/unittests/dygraph_to_static/test_mnist_pure_fp16.py
...tests/unittests/dygraph_to_static/test_mnist_pure_fp16.py
+1
-2
python/paddle/fluid/tests/unittests/dygraph_to_static/test_mobile_net.py
...luid/tests/unittests/dygraph_to_static/test_mobile_net.py
+1
-2
python/paddle/fluid/tests/unittests/dygraph_to_static/test_multi_forward.py
...d/tests/unittests/dygraph_to_static/test_multi_forward.py
+1
-3
python/paddle/fluid/tests/unittests/dygraph_to_static/test_program_translator.py
...ts/unittests/dygraph_to_static/test_program_translator.py
+1
-2
python/paddle/fluid/tests/unittests/dygraph_to_static/test_ptb_lm.py
...le/fluid/tests/unittests/dygraph_to_static/test_ptb_lm.py
+1
-3
未找到文件。
python/paddle/fluid/tests/unittests/dygraph_to_static/test_mnist.py
浏览文件 @
33fa2684
...
...
@@ -25,7 +25,6 @@ import paddle.fluid as fluid
from
paddle.fluid.dygraph
import
to_variable
from
paddle.fluid.dygraph.base
import
switch_to_static_graph
from
paddle.fluid.dygraph.io
import
INFER_MODEL_SUFFIX
,
INFER_PARAMS_SUFFIX
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.optimizer
import
AdamOptimizer
from
paddle.nn
import
Linear
...
...
@@ -168,17 +167,6 @@ class TestMNISTWithToStatic(TestMNIST):
dygraph_loss
,
static_loss
),
)
with
_test_eager_guard
():
dygraph_loss
=
self
.
train_dygraph
()
static_loss
=
self
.
train_static
()
np
.
testing
.
assert_allclose
(
dygraph_loss
,
static_loss
,
rtol
=
1e-05
,
err_msg
=
'dygraph is {}
\n
static_res is
\n
{}'
.
format
(
dygraph_loss
,
static_loss
),
)
def
test_mnist_declarative_cpu_vs_mkldnn
(
self
):
dygraph_loss_cpu
=
self
.
train_dygraph
()
...
...
python/paddle/fluid/tests/unittests/dygraph_to_static/test_mnist_amp.py
浏览文件 @
33fa2684
...
...
@@ -106,5 +106,4 @@ class TestAMP(TestMNIST):
if
__name__
==
'__main__'
:
with
paddle
.
fluid
.
framework
.
_test_eager_guard
():
unittest
.
main
()
unittest
.
main
()
python/paddle/fluid/tests/unittests/dygraph_to_static/test_mnist_pure_fp16.py
浏览文件 @
33fa2684
...
...
@@ -120,5 +120,4 @@ class TestPureFP16(TestMNIST):
if
__name__
==
'__main__'
:
with
paddle
.
fluid
.
framework
.
_test_eager_guard
():
unittest
.
main
()
unittest
.
main
()
python/paddle/fluid/tests/unittests/dygraph_to_static/test_mobile_net.py
浏览文件 @
33fa2684
...
...
@@ -726,5 +726,4 @@ class TestMobileNet(unittest.TestCase):
if
__name__
==
'__main__'
:
with
fluid
.
framework
.
_test_eager_guard
():
unittest
.
main
()
unittest
.
main
()
python/paddle/fluid/tests/unittests/dygraph_to_static/test_multi_forward.py
浏览文件 @
33fa2684
...
...
@@ -15,7 +15,6 @@
import
unittest
import
paddle
import
paddle.fluid
as
fluid
class
MyLayer
(
paddle
.
nn
.
Layer
):
...
...
@@ -63,5 +62,4 @@ class TestBackward(unittest.TestCase):
if
__name__
==
'__main__'
:
with
fluid
.
framework
.
_test_eager_guard
():
unittest
.
main
()
unittest
.
main
()
python/paddle/fluid/tests/unittests/dygraph_to_static/test_program_translator.py
浏览文件 @
33fa2684
...
...
@@ -439,5 +439,4 @@ class TestRemoveCommentInDy2St(unittest.TestCase):
if
__name__
==
'__main__'
:
with
fluid
.
framework
.
_test_eager_guard
():
unittest
.
main
()
unittest
.
main
()
python/paddle/fluid/tests/unittests/dygraph_to_static/test_ptb_lm.py
浏览文件 @
33fa2684
...
...
@@ -347,6 +347,4 @@ class TestPtb(unittest.TestCase):
if
__name__
==
'__main__'
:
# switch into new eager mode
with
fluid
.
framework
.
_test_eager_guard
():
unittest
.
main
()
unittest
.
main
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录