diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index 01f63eca8576a2142bd699c06d3461a7d17cc3c0..39d589cb2a9009fed29c13f672c6e586fa2f9ca3 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 fe496b55f9129746bc523eaf23cb3d87be249536..c7f2a73f2ad5e5c22e822048e960194106496320 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 c09d7fd7751a68e9aa788e82f83d32d671549849..3cb84a2b3c1e3dc57f4684cb9100edfadbefbf96 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)