Skip to content

Commit e28b6f5

Browse files
author
666DZY666
committed
update readme
1 parent 1e210d4 commit e28b6f5

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

README.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,9 @@ cd micronet/compression/quantization/wqaq/iao
272272

273273
--weight_observer, weight_observer选择(0-MinMaxObserver, 1-MovingAverageMinMaxObserver)
274274

275-
- (默认)对称、(权重)通道级量化, bn不融合, weight_observer-MinMaxObserver
275+
--pretrained_model, 预训练浮点模型
276+
277+
- 默认: 对称、(权重)通道级量化, bn不融合, weight_observer-MinMaxObserver, 不加载预训练浮点模型
276278

277279
```bash
278280
python main.py --q_type 0 --q_level 0 --bn_fuse 0 --weight_observer 0 --gpu_id 0
@@ -415,34 +417,40 @@ python main.py --model_type 1 --gc_prune_refine 154 162 144 304 320 320 608 584
415417

416418
##### 剪枝 —> 量化(高位)(剪枝率偏大、量化率偏小)
417419

418-
- dorefa
420+
###### w8a8(dorefa)
419421

420422
```bash
421423
cd micronet/compression/quantization/wqaq/dorefa
422424
```
423425

424-
426+
- nin(正常卷积结构)
425427

426-
- iao
428+
```bash
429+
python main.py --w_bits 8 --a_bits 8 --model_type 0 --prune_refine ../../../pruning/models_save/nin_finetune.pth
430+
```
427431

428-
*单卡*
432+
- nin_gc(含分组卷积结构)
429433

430434
```bash
431-
cd micronet/compression/quantization/wqaq/iao
435+
python main.py --w_bits 8 --a_bits 8 --model_type 1 --prune_refine ../../../pruning/models_save/nin_gc_retrain.pth
432436
```
433437

434-
###### w8a8
438+
###### w8a8(iao)
439+
440+
```bash
441+
cd micronet/compression/quantization/wqaq/iao
442+
```
435443

436444
- nin(正常卷积结构)
437445

438446
```bash
439-
python main.py --w_bits 8 --a_bits 8 --model_type 0 --prune_refine ../../../pruning/models_save/nin_finetune.pth
447+
python main.py --w_bits 8 --a_bits 8 --model_type 0 --prune_refine ../../../pruning/models_save/nin_finetune.pth --pretrained_model --gpu_id 0
440448
```
441449

442450
- nin_gc(含分组卷积结构)
443451

444452
```bash
445-
python main.py --w_bits 8 --a_bits 8 --model_type 1 --prune_refine ../../../pruning/models_save/nin_gc_retrain.pth
453+
python main.py --w_bits 8 --a_bits 8 --model_type 1 --prune_refine ../../../pruning/models_save/nin_gc_retrain.pth --pretrained_model --gpu_id 0
446454
```
447455

448456
###### 其他可选量化配置类比

micronet/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "1.7.1"
1+
__version__ = "1.7.2"
22

33
def quant_test_manual():
44
import torch.nn as nn

0 commit comments

Comments
 (0)