From 0c08cdf72d6113c31ef1c82a70ea62c89dbfc6e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E5=89=91=E6=AD=A6?= Date: Fri, 11 Oct 2019 18:45:45 +0800 Subject: [PATCH] fix conv_to_fc transformer when weight is reused by other conv --- tools/python/transform/transformer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/python/transform/transformer.py b/tools/python/transform/transformer.py index d374ec46..778dcb1f 100644 --- a/tools/python/transform/transformer.py +++ b/tools/python/transform/transformer.py @@ -1013,7 +1013,8 @@ class Transformer(base_converter.ConverterInterface): zero_padding = False if height == filter_height and width == filter_width \ - and zero_padding: + and zero_padding \ + and len(self._consumers[op.input[1]]) == 1: print("transform global conv to fc %s(%s)" % (op.name, op.type)) op.type = MaceOp.FullyConnected.name -- GitLab