From 123e17d71d1cfb484791b79472f180e44dd4cc19 Mon Sep 17 00:00:00 2001 From: Bin Li Date: Wed, 29 Apr 2020 17:30:13 +0800 Subject: [PATCH] Fix caffe quantized fc --- tools/python/transform/transformer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/python/transform/transformer.py b/tools/python/transform/transformer.py index bbc94f5c..19a2921c 100644 --- a/tools/python/transform/transformer.py +++ b/tools/python/transform/transformer.py @@ -1115,7 +1115,9 @@ class Transformer(base_converter.ConverterInterface): if (op.type == MaceOp.Conv2D.name or op.type == MaceOp.Deconv2D.name or (op.type == MaceOp.DepthwiseConv2d.name and - self._option.device == DeviceType.APU.value)) and\ + self._option.device == DeviceType.APU.value) or + (op.type == MaceOp.FullyConnected.name and + len(self._consts[op.input[1]].dims) == 4)) and \ op.input[1] not in transposed_filter: filter = self._consts[op.input[1]] filter_data = np.array(filter.float_data).reshape( -- GitLab