Browse Source

!9623 use two_conv_fold for ascend quant net

From: @yuchaojie
Reviewed-by: @linqingke,@liangchenghui
Signed-off-by: @linqingke
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
f086e59bd2
3 changed files with 6 additions and 3 deletions
  1. +2
    -1
      model_zoo/official/cv/mobilenetv2_quant/train.py
  2. +2
    -1
      model_zoo/official/cv/resnet50_quant/train.py
  3. +2
    -1
      model_zoo/official/cv/yolov3_darknet53_quant/train.py

+ 2
- 1
model_zoo/official/cv/mobilenetv2_quant/train.py 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


+ 2
- 1
model_zoo/official/cv/resnet50_quant/train.py 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


+ 2
- 1
model_zoo/official/cv/yolov3_darknet53_quant/train.py 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)


Loading…
Cancel
Save