提交 ded3fd27 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Don't copy the mode unnecessarily.

上级 94f1ad79
...@@ -34,7 +34,7 @@ class TestPool(unittest.TestCase): ...@@ -34,7 +34,7 @@ class TestPool(unittest.TestCase):
ds_op(inp, [2, 2], pad=[1, 1]) ds_op(inp, [2, 2], pad=[1, 1])
def test_pool_c_interface(self): def test_pool_c_interface(self):
gpu_mode = copy.copy(mode_with_gpu).excluding("cudnn") gpu_mode = mode_with_gpu.excluding("cudnn")
gpu_mode.check_py_code = False gpu_mode.check_py_code = False
shp = (2, 2, 2, 2) shp = (2, 2, 2, 2)
...@@ -48,7 +48,7 @@ class TestPool(unittest.TestCase): ...@@ -48,7 +48,7 @@ class TestPool(unittest.TestCase):
f() f()
def test_pool_big_ws(self): def test_pool_big_ws(self):
gpu_mode = copy.copy(mode_with_gpu).excluding("cudnn") gpu_mode = mode_with_gpu.excluding("cudnn")
gpu_mode.check_py_code = False gpu_mode.check_py_code = False
shp = (2, 2, 2, 2) shp = (2, 2, 2, 2)
...@@ -101,7 +101,7 @@ def test_pool2d(): ...@@ -101,7 +101,7 @@ def test_pool2d():
ref_mode = copy.copy(mode_without_gpu) ref_mode = copy.copy(mode_without_gpu)
ref_mode.check_py_code = False ref_mode.check_py_code = False
gpu_mode = copy.copy(mode_with_gpu).excluding("cudnn") gpu_mode = mode_with_gpu.excluding("cudnn")
gpu_mode.check_py_code = False gpu_mode.check_py_code = False
for shp in shps: for shp in shps:
...@@ -211,7 +211,7 @@ def test_pool3d(): ...@@ -211,7 +211,7 @@ def test_pool3d():
ref_mode = copy.copy(mode_without_gpu) ref_mode = copy.copy(mode_without_gpu)
ref_mode.check_py_code = False ref_mode.check_py_code = False
gpu_mode = copy.copy(mode_with_gpu).excluding("cudnn") gpu_mode = mode_with_gpu.excluding("cudnn")
gpu_mode.check_py_code = False gpu_mode.check_py_code = False
for shp in shps: for shp in shps:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论