未验证 提交 4e4d58b3 编写于 作者: S Siming Dai 提交者: GitHub

Fixed corner case in fill_constant (#38284)

上级 0eb03ed7
......@@ -363,7 +363,7 @@ def convert_shape_to_list(shape):
"""
if isinstance(shape, (list, tuple)):
shape = list(
map(lambda x: x.numpy()[0] if isinstance(x, Variable) else x,
map(lambda x: x.numpy().flat[0] if isinstance(x, Variable) else x,
shape))
else:
shape = shape.numpy().astype(int).tolist()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册