未验证 提交 e0344081 编写于 作者: L liym27 提交者: GitHub

fix code: if y is True -> if y (#29184)

上级 7e7b4b9e
......@@ -211,7 +211,7 @@ class NetWithDictPop(paddle.nn.Layer):
def forward(self, x, **kwargs):
x = paddle.to_tensor(x)
y = kwargs.pop('y', None)
if y is True:
if y:
y = paddle.to_tensor(x)
x += y
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册