提交 5efb4719 编写于 作者: 李滨

Merge branch '263' into 'master'

Fix issue 263

See merge request !908
......@@ -1233,7 +1233,8 @@ class Transformer(base_converter.ConverterInterface):
if op.type == MaceOp.Reshape.name and \
op.input[1] in self._consts and \
len(op.output_shape[0].dims) == 2 and \
filter_format == FilterFormat.HWIO:
filter_format == FilterFormat.HWIO and \
op.input[0] in self._producer:
input_op = self._producer[op.input[0]]
input_shape = input_op.output_shape[0].dims
# check input op
......@@ -1553,9 +1554,9 @@ class Transformer(base_converter.ConverterInterface):
def add_quantize_tensor_range(self):
# Quantize info from range statistics
print("Add quantize tensor range")
range_file = self._option.quantize_range_file
if range_file:
print("Add quantize tensor range")
with open(range_file) as f:
for line in f:
tensor_name, minmax = line.split("@@")[:2]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册