From 40ef894029dcfc449e7cefb13e3c7d7808483352 Mon Sep 17 00:00:00 2001 From: zhang__sss Date: Thu, 17 Jun 2021 19:40:38 +0800 Subject: [PATCH] modify weight offset for air --- mindspore/compression/export/quant_export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/compression/export/quant_export.py b/mindspore/compression/export/quant_export.py index 92e0df88515..10f6e20089f 100644 --- a/mindspore/compression/export/quant_export.py +++ b/mindspore/compression/export/quant_export.py @@ -85,7 +85,7 @@ class QuantBlock(Cell): self.has_act = activation is not None self.bias_add = P.BiasAdd() self.sub = P.Sub() - self.weight_offset = Parameter(np.zeros(shape=weight.shape, dtype=np.int8), name='weight_offset') + self.weight_offset = Parameter(np.zeros(1, dtype=np.int8), name='weight_offset') def construct(self, x): x = self.quant(x)