From 9051c564366044acfefbf120c135e9c8f69b14a3 Mon Sep 17 00:00:00 2001 From: yuchaojie Date: Tue, 24 Nov 2020 10:51:09 +0800 Subject: [PATCH] remove quantization_aware option in Mobilenetv2-quant config --- model_zoo/official/cv/mobilenetv2_quant/README_CN.md | 6 +++--- model_zoo/official/cv/mobilenetv2_quant/Readme.md | 6 +++--- model_zoo/official/cv/mobilenetv2_quant/src/config.py | 5 ++--- .../mobilenetv2_quant/test_mobilenetv2_quant.py | 1 - 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/model_zoo/official/cv/mobilenetv2_quant/README_CN.md b/model_zoo/official/cv/mobilenetv2_quant/README_CN.md index b29efc92768..8704674e522 100644 --- a/model_zoo/official/cv/mobilenetv2_quant/README_CN.md +++ b/model_zoo/official/cv/mobilenetv2_quant/README_CN.md @@ -102,10 +102,10 @@ MobileNetV2总体网络架构如下: - 配置MobileNetV2-quant和ImageNet2012数据集。 ```python - 'class_num':1000 # 数据集类数 + 'num_classes':1000 # 数据集类数 'batch_size':134 # 训练批次大小 - 'epoch_size':60 # Mobilenetv2-quant的训练轮次 - 'start epoch':200 # 非量化网络预训练轮次 + 'epoch_size':60 # Mobilenetv2-quant的训练轮次 + 'start_epoch':200 # 非量化网络预训练轮次 'warmup_epochs':0 # 热身轮次 'lr':0.3 # 学习率 'momentum':0.9 # 动量 diff --git a/model_zoo/official/cv/mobilenetv2_quant/Readme.md b/model_zoo/official/cv/mobilenetv2_quant/Readme.md index 3a9a9134d98..86024a28549 100644 --- a/model_zoo/official/cv/mobilenetv2_quant/Readme.md +++ b/model_zoo/official/cv/mobilenetv2_quant/Readme.md @@ -92,10 +92,10 @@ Parameters for both training and evaluation can be set in config.py - config for MobileNetV2-quant, ImageNet2012 dataset ```python - 'class_num': 1000 # the number of classes in the dataset + 'num_classes': 1000 # the number of classes in the dataset 'batch_size': 134 # training batch size - 'epoch_size': 60 # training epochs of mobilenetv2-quant - 'start epoch':200 # pretraining epochs of unquantative network + 'epoch_size': 60 # training epochs of mobilenetv2-quant + 'start_epoch':200 # pretraining epochs of unquantative network 'warmup_epochs': 0 # number of warmup epochs 'lr': 0.3 #learning rate 'momentum': 0.9 # momentum diff --git a/model_zoo/official/cv/mobilenetv2_quant/src/config.py b/model_zoo/official/cv/mobilenetv2_quant/src/config.py index de4f5c2bd25..53c6eea3d8a 100644 --- a/model_zoo/official/cv/mobilenetv2_quant/src/config.py +++ b/model_zoo/official/cv/mobilenetv2_quant/src/config.py @@ -24,7 +24,7 @@ config_ascend_quant = ed({ "data_load_mode": "mindata", "epoch_size": 60, "start_epoch": 200, - "warmup_epochs": 1, + "warmup_epochs": 0, "lr": 0.3, "momentum": 0.9, "weight_decay": 4e-5, @@ -34,7 +34,6 @@ config_ascend_quant = ed({ "save_checkpoint_epochs": 1, "keep_checkpoint_max": 300, "save_checkpoint_path": "./checkpoint", - "quantization_aware": True, }) config_gpu_quant = ed({ @@ -42,7 +41,7 @@ config_gpu_quant = ed({ "batch_size": 134, "epoch_size": 60, "start_epoch": 200, - "warmup_epochs": 1, + "warmup_epochs": 0, "lr": 0.3, "momentum": 0.9, "weight_decay": 4e-5, diff --git a/tests/st/quantization/mobilenetv2_quant/test_mobilenetv2_quant.py b/tests/st/quantization/mobilenetv2_quant/test_mobilenetv2_quant.py index 82655b1833c..1a9f0708e74 100644 --- a/tests/st/quantization/mobilenetv2_quant/test_mobilenetv2_quant.py +++ b/tests/st/quantization/mobilenetv2_quant/test_mobilenetv2_quant.py @@ -50,7 +50,6 @@ config_ascend_quant = ed({ "save_checkpoint_epochs": 1, "keep_checkpoint_max": 300, "save_checkpoint_path": "./checkpoint", - "quantization_aware": True, }) dataset_path = "/home/workspace/mindspore_dataset/cifar-10-batches-bin/"