From 657b64019568d6d0b9e4bc90e62cefa1389e2411 Mon Sep 17 00:00:00 2001 From: iLeGend <824040212@qq.com> Date: Thu, 31 Aug 2023 11:13:31 +0800 Subject: [PATCH] fix some typos like y ... name='x' (#56724) --- python/paddle/fluid/framework.py | 2 +- python/paddle/ir/core.py | 2 +- test/legacy_test/test_isclose_op.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index 01f63eca857..39d589cb2a9 100644 --- a/python/paddle/fluid/framework.py +++ b/python/paddle/fluid/framework.py @@ -7456,7 +7456,7 @@ def default_main_program(): paddle.enable_static() # Sample Network: x = paddle.static.data(name='x', shape=[100, 100], dtype='float32') - y = paddle.static.data(name='x', shape=[100, 100], dtype='float32') + y = paddle.static.data(name='y', shape=[100, 100], dtype='float32') out = paddle.add(x, y) #print the number of blocks in the program, 1 in this case diff --git a/python/paddle/ir/core.py b/python/paddle/ir/core.py index fe496b55f91..c7f2a73f2ad 100644 --- a/python/paddle/ir/core.py +++ b/python/paddle/ir/core.py @@ -141,7 +141,7 @@ def default_main_program(): paddle.enable_static() # Sample Network: x = paddle.static.data(name='x', shape=[100, 100], dtype='float32') - y = paddle.static.data(name='x', shape=[100, 100], dtype='float32') + y = paddle.static.data(name='y', shape=[100, 100], dtype='float32') out = paddle.add(x, y) #print the number of blocks in the program, 1 in this case diff --git a/test/legacy_test/test_isclose_op.py b/test/legacy_test/test_isclose_op.py index c09d7fd7751..3cb84a2b3c1 100644 --- a/test/legacy_test/test_isclose_op.py +++ b/test/legacy_test/test_isclose_op.py @@ -214,7 +214,7 @@ class TestIscloseOpFp16(unittest.TestCase): y_data = np.random.rand(10, 10).astype('float16') with paddle.static.program_guard(paddle.static.Program()): x = paddle.static.data(shape=[10, 10], name='x', dtype='float16') - y = paddle.static.data(shape=[10, 10], name='x', dtype='float16') + y = paddle.static.data(shape=[10, 10], name='y', dtype='float16') out = paddle.isclose(x, y, rtol=1e-05, atol=1e-08) if core.is_compiled_with_cuda(): place = paddle.CUDAPlace(0) -- GitLab