!18483 modify weight offset to shape=1 for air model size

Merge pull request !18483 from zhang_sss/quant_export_weightoffset
This commit is contained in:
i-robot 2021-06-18 01:31:00 +00:00 committed by Gitee
commit 65eacb5085
1 changed files with 1 additions and 1 deletions

View File

@ -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)