diff --git a/mace/python/tools/converter_tool/tensorflow_converter.py b/mace/python/tools/converter_tool/tensorflow_converter.py index a63101a1af8661eb16aa1b094b60aae52f2877f9..0b3661b9c1fcb5216f59a79054f3fdb73f3375c9 100644 --- a/mace/python/tools/converter_tool/tensorflow_converter.py +++ b/mace/python/tools/converter_tool/tensorflow_converter.py @@ -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)