From 36cd633952c79e248e03af8e0974335916dfa99d Mon Sep 17 00:00:00 2001 From: lichao18 Date: Wed, 12 Jun 2019 17:27:00 +0800 Subject: [PATCH] Fix a converter bug for tensorflow reduce op --- mace/python/tools/converter_tool/tensorflow_converter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mace/python/tools/converter_tool/tensorflow_converter.py b/mace/python/tools/converter_tool/tensorflow_converter.py index a63101a1..0b3661b9 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) -- GitLab