!9623 use two_conv_fold for ascend quant net

From: @yuchaojie
Reviewed-by: @linqingke,@liangchenghui
Signed-off-by: @linqingke
This commit is contained in:
mindspore-ci-bot 2020-12-08 15:26:29 +08:00 committed by Gitee
commit f086e59bd2
3 changed files with 6 additions and 3 deletions

View File

@ -101,7 +101,8 @@ def train_on_ascend():
# convert fusion network to quantization aware network
quantizer = QuantizationAwareTraining(bn_fold=True,
per_channel=[True, False],
symmetric=[True, False])
symmetric=[True, False],
one_conv_fold=False)
network = quantizer.quantize(network)
# get learning rate

View File

@ -115,7 +115,8 @@ if __name__ == '__main__':
# convert fusion network to quantization aware network
quantizer = QuantizationAwareTraining(bn_fold=True,
per_channel=[True, False],
symmetric=[True, False])
symmetric=[True, False],
one_conv_fold=False)
net = quantizer.quantize(net)
# get learning rate

View File

@ -170,7 +170,8 @@ def train():
if config.quantization_aware:
quantizer = QuantizationAwareTraining(bn_fold=True,
per_channel=[True, False],
symmetric=[True, False])
symmetric=[True, False],
one_conv_fold=False)
network = quantizer.quantize(network)
network = YoloWithLossCell(network)