提交 4890a944 编写于 作者: 叶剑武

Merge branch 'fix-fold-fc-reshape' into 'master'

fix fold fc reshape

See merge request !928
......@@ -1777,7 +1777,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.
先完成此消息的编辑!
想要评论请 注册