提交 9c67c31b 编写于 作者: 叶剑武

register uint8 reshape for cpu

remove identity in-out reshape op in converter
上级 708aa21e
......@@ -356,6 +356,13 @@ class Transformer(base_converter.ConverterInterface):
self.safe_remove_node(op,
self._producer.get(op.input[0], None))
return True
if op.type == 'Reshape' and \
op.output_shape[0].dims == \
self.get_tensor_shape(op.input[0]):
print("Remove useless reshape: %s(%s)" % (op.name, op.type))
self.safe_remove_node(op,
self._producer.get(op.input[0], None))
return True
return False
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册