From d82b9b4a6d05768483a9553f4d96c2eed142bf1d Mon Sep 17 00:00:00 2001 From: lichao18 Date: Tue, 11 Dec 2018 18:19:35 +0800 Subject: [PATCH] fix a convert split bug --- mace/python/tools/converter_tool/tensorflow_converter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mace/python/tools/converter_tool/tensorflow_converter.py b/mace/python/tools/converter_tool/tensorflow_converter.py index 4b48ab9d..a76fca48 100644 --- a/mace/python/tools/converter_tool/tensorflow_converter.py +++ b/mace/python/tools/converter_tool/tensorflow_converter.py @@ -885,10 +885,10 @@ class TensorflowConverter(base_converter.ConverterInterface): op.output_type.extend([mace_pb2.DT_INT32]) def convert_split(self, tf_op): - axis = tf_op.inputs[0].eval().astype(np.int32) - axis = len(op.output_shape[0].dims) + axis if axis < 0 else axis op = self.convert_general_op(tf_op) op.type = MaceOp.Split.name + axis = tf_op.inputs[0].eval().astype(np.int32) + axis = len(op.output_shape[0].dims) + axis if axis < 0 else axis del op.input[0] axis_arg = op.arg.add() -- GitLab