Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
da63f99e
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看板
未验证
提交
da63f99e
编写于
12月 14, 2022
作者:
姜
姜永久
提交者:
GitHub
12月 15, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rm eager guard tests part3_3 (#49061)
上级
3fec7a6e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
1 addition
and
31 deletion
+1
-31
python/paddle/fluid/tests/unittests/test_complex_sum_layer.py
...on/paddle/fluid/tests/unittests/test_complex_sum_layer.py
+0
-5
python/paddle/fluid/tests/unittests/test_complex_trace_layer.py
.../paddle/fluid/tests/unittests/test_complex_trace_layer.py
+0
-5
python/paddle/fluid/tests/unittests/test_complex_transpose.py
...on/paddle/fluid/tests/unittests/test_complex_transpose.py
+0
-5
python/paddle/fluid/tests/unittests/test_complex_variable.py
python/paddle/fluid/tests/unittests/test_complex_variable.py
+1
-7
python/paddle/fluid/tests/unittests/test_complex_view_op.py
python/paddle/fluid/tests/unittests/test_complex_view_op.py
+0
-9
未找到文件。
python/paddle/fluid/tests/unittests/test_complex_sum_layer.py
浏览文件 @
da63f99e
...
...
@@ -21,7 +21,6 @@ import paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.dygraph
as
dg
from
paddle
import
tensor
from
paddle.fluid.framework
import
_test_eager_guard
class
TestComplexSumLayer
(
unittest
.
TestCase
):
...
...
@@ -43,10 +42,6 @@ class TestComplexSumLayer(unittest.TestCase):
target
=
np
.
sum
(
input
,
axis
=
(
1
,
2
))
np
.
testing
.
assert_allclose
(
result
,
target
,
rtol
=
1e-05
)
def
test_eager
(
self
):
with
_test_eager_guard
():
self
.
test_complex_basic_api
()
if
__name__
==
'__main__'
:
unittest
.
main
()
python/paddle/fluid/tests/unittests/test_complex_trace_layer.py
浏览文件 @
da63f99e
...
...
@@ -20,7 +20,6 @@ from numpy.random import random as rand
import
paddle.fluid
as
fluid
import
paddle.fluid.dygraph
as
dg
from
paddle
import
tensor
from
paddle.fluid.framework
import
_test_eager_guard
class
TestComplexTraceLayer
(
unittest
.
TestCase
):
...
...
@@ -44,10 +43,6 @@ class TestComplexTraceLayer(unittest.TestCase):
target
=
np
.
trace
(
input
,
offset
=
1
,
axis1
=
0
,
axis2
=
2
)
np
.
testing
.
assert_allclose
(
result
,
target
,
rtol
=
1e-05
)
def
test_eager
(
self
):
with
_test_eager_guard
():
self
.
test_basic_api
()
if
__name__
==
'__main__'
:
unittest
.
main
()
python/paddle/fluid/tests/unittests/test_complex_transpose.py
浏览文件 @
da63f99e
...
...
@@ -19,7 +19,6 @@ import numpy as np
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.dygraph
as
dg
from
paddle.fluid.framework
import
_test_eager_guard
class
TestComplexTransposeLayer
(
unittest
.
TestCase
):
...
...
@@ -42,10 +41,6 @@ class TestComplexTransposeLayer(unittest.TestCase):
trans
=
paddle
.
transpose
(
var
,
perm
=
perm
)
np
.
testing
.
assert_allclose
(
trans
.
numpy
(),
np_trans
,
rtol
=
1e-05
)
def
test_eager
(
self
):
with
_test_eager_guard
():
self
.
test_transpose_by_complex_api
()
if
__name__
==
'__main__'
:
unittest
.
main
()
python/paddle/fluid/tests/unittests/test_complex_variable.py
浏览文件 @
da63f99e
...
...
@@ -20,7 +20,7 @@ import paddle
import
paddle.fluid.core
as
core
import
paddle.fluid.dygraph
as
dg
from
paddle.fluid.data_feeder
import
convert_dtype
from
paddle.fluid.framework
import
_test_eager_guard
,
convert_np_dtype_to_dtype_
from
paddle.fluid.framework
import
convert_np_dtype_to_dtype_
class
TestComplexVariable
(
unittest
.
TestCase
):
...
...
@@ -64,12 +64,6 @@ class TestComplexVariable(unittest.TestCase):
convert_dtype
(
core
.
VarDesc
.
VarType
.
COMPLEX128
),
"complex128"
)
def
test_eager
(
self
):
with
_test_eager_guard
():
self
.
test_attrs
()
self
.
test_convert_np_dtype_to_dtype
()
self
.
test_convert_dtype
()
if
__name__
==
'__main__'
:
unittest
.
main
()
python/paddle/fluid/tests/unittests/test_complex_view_op.py
浏览文件 @
da63f99e
...
...
@@ -20,7 +20,6 @@ from op_test import OpTest
import
paddle
from
paddle
import
static
from
paddle.fluid
import
dygraph
from
paddle.fluid.framework
import
_test_eager_guard
paddle
.
enable_static
()
...
...
@@ -106,10 +105,6 @@ class TestViewAsComplexAPI(unittest.TestCase):
[
out_np
]
=
exe
.
run
(
mp
,
feed
=
{
"x"
:
self
.
x
},
fetch_list
=
[
out
])
np
.
testing
.
assert_allclose
(
self
.
out
,
out_np
,
rtol
=
1e-05
)
def
test_eager
(
self
):
with
_test_eager_guard
():
self
.
test_dygraph
()
class
TestViewAsRealAPI
(
unittest
.
TestCase
):
def
setUp
(
self
):
...
...
@@ -133,10 +128,6 @@ class TestViewAsRealAPI(unittest.TestCase):
[
out_np
]
=
exe
.
run
(
mp
,
feed
=
{
"x"
:
self
.
x
},
fetch_list
=
[
out
])
np
.
testing
.
assert_allclose
(
self
.
out
,
out_np
,
rtol
=
1e-05
)
def
test_eager
(
self
):
with
_test_eager_guard
():
self
.
test_dygraph
()
if
__name__
==
"__main__"
:
unittest
.
main
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录