未验证 提交 33a7bb88 编写于 作者: N Nyakku Shigure 提交者: GitHub

[CodeStyle][E231] remove unnecessary `,` (#47297)

上级 d8690564
...@@ -47,7 +47,9 @@ class PsPassTestBase(unittest.TestCase): ...@@ -47,7 +47,9 @@ class PsPassTestBase(unittest.TestCase):
if ps_mode == "cpu-ps" or ps_mode == 'heter-ps': if ps_mode == "cpu-ps" or ps_mode == 'heter-ps':
os.environ['WITH_DISTRIBUTE'] = 'ON' os.environ['WITH_DISTRIBUTE'] = 'ON'
cmd = [sys.executable, "-u",] + [ cmd = [
sys.executable,
"-u",
"-m", "-m",
"launch", "launch",
"--log_dir", "--log_dir",
......
...@@ -106,9 +106,7 @@ def _reference_layer_norm_grad( ...@@ -106,9 +106,7 @@ def _reference_layer_norm_grad(
grad_x = dx_end + d_mean + d_std grad_x = dx_end + d_mean + d_std
grad_x.shape, x.shape, grad_y.shape = x_shape, x_shape, x_shape grad_x.shape, x.shape, grad_y.shape = x_shape, x_shape, x_shape
var.shape, mean.shape = [N,], [ var.shape, mean.shape = [N], [N]
N,
]
if scale is not None: if scale is not None:
scale.shape = scale_shape scale.shape = scale_shape
......
...@@ -1316,7 +1316,7 @@ class TestGradientTruncated(unittest.TestCase): ...@@ -1316,7 +1316,7 @@ class TestGradientTruncated(unittest.TestCase):
def test_static_graph(self): def test_static_graph(self):
paddle.enable_static() 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) numel = lambda input_shape: reduce(lambda x, y: x * y, input_shape)
def op1(x): def op1(x):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册