提交 36cd6339 编写于 作者: L lichao18

Fix a converter bug for tensorflow reduce op

上级 1a32189e
......@@ -912,7 +912,7 @@ class TensorflowConverter(base_converter.ConverterInterface):
reduce_dims = tf_op.get_attr('reduction_indices')
except ValueError:
reduce_dims = []
if isinstance(reduce_dims, list):
if isinstance(reduce_dims, (np.ndarray, list)):
axis_arg.ints.extend(reduce_dims)
else:
axis_arg.ints.append(reduce_dims)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册