提交 99ed7919 编写于 作者: L liutuo

fix fold fc reshape

上级 1a35a1a0
......@@ -1786,7 +1786,8 @@ class Transformer(base_converter.ConverterInterface):
net = self._model
for op in net.op:
# whether to reshape fc output(default 4D)
if op.type == MaceOp.FullyConnected.name:
if op.type == MaceOp.FullyConnected.name and\
op.output[0] in self._consumers:
consumers = self._consumers[op.output[0]]
op_output_shape = op.output_shape[0].dims[:]
for consumer in consumers:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册