diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/ps_pass_test_base.py b/python/paddle/fluid/tests/unittests/distributed_passes/ps_pass_test_base.py index 87f275c21c6f3bfe5ece1b647f53cb6a19682441..5b309a5d0ee87ed33d2a1567477ada8bc8896e85 100755 --- a/python/paddle/fluid/tests/unittests/distributed_passes/ps_pass_test_base.py +++ b/python/paddle/fluid/tests/unittests/distributed_passes/ps_pass_test_base.py @@ -47,7 +47,9 @@ class PsPassTestBase(unittest.TestCase): if ps_mode == "cpu-ps" or ps_mode == 'heter-ps': os.environ['WITH_DISTRIBUTE'] = 'ON' - cmd = [sys.executable, "-u",] + [ + cmd = [ + sys.executable, + "-u", "-m", "launch", "--log_dir", diff --git a/python/paddle/fluid/tests/unittests/test_layer_norm_op.py b/python/paddle/fluid/tests/unittests/test_layer_norm_op.py index 17d2730b3e8f7b80e8d87b735014a0d5dd3e5c3a..502f4ec5bb9775e61a100d640cc845703f6d36d9 100644 --- a/python/paddle/fluid/tests/unittests/test_layer_norm_op.py +++ b/python/paddle/fluid/tests/unittests/test_layer_norm_op.py @@ -106,9 +106,7 @@ def _reference_layer_norm_grad( grad_x = dx_end + d_mean + d_std grad_x.shape, x.shape, grad_y.shape = x_shape, x_shape, x_shape - var.shape, mean.shape = [N,], [ - N, - ] + var.shape, mean.shape = [N], [N] if scale is not None: scale.shape = scale_shape diff --git a/python/paddle/fluid/tests/unittests/test_set_value_op.py b/python/paddle/fluid/tests/unittests/test_set_value_op.py index 92dc8b8fadcb7745f82e74653516a4afaa54cfd3..39a07fd2109f8f778d1e41235b6ebbbe5e623140 100644 --- a/python/paddle/fluid/tests/unittests/test_set_value_op.py +++ b/python/paddle/fluid/tests/unittests/test_set_value_op.py @@ -1316,7 +1316,7 @@ class TestGradientTruncated(unittest.TestCase): def test_static_graph(self): paddle.enable_static() - to_string = lambda x, i,: x + '_' + str(i) + to_string = lambda x, i: x + '_' + str(i) numel = lambda input_shape: reduce(lambda x, y: x * y, input_shape) def op1(x):