提交 d82b9b4a 编写于 作者: L lichao18

fix a convert split bug

上级 3cdf9973
...@@ -885,10 +885,10 @@ class TensorflowConverter(base_converter.ConverterInterface): ...@@ -885,10 +885,10 @@ class TensorflowConverter(base_converter.ConverterInterface):
op.output_type.extend([mace_pb2.DT_INT32]) op.output_type.extend([mace_pb2.DT_INT32])
def convert_split(self, tf_op): 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 = self.convert_general_op(tf_op)
op.type = MaceOp.Split.name 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] del op.input[0]
axis_arg = op.arg.add() axis_arg = op.arg.add()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册