forked from charlesxzb/model-zoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mlir.config.yaml
56 lines (50 loc) · 1.67 KB
/
mlir.config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
name: face_alignment
gops: [0.398]
shapes:
- [1, 3, 112, 112]
mlir_transform:
model_transform.py
--model_name $(name)
--model_def $(home)/$(name).onnx
--input_shapes [$(shape_param)]
--resize_dims 256,256
--mean 123.675,116.28,103.53
--scale 0.01712475,0.01750700,0.01742919
--test_input $(root)/dataset/samples/cat.jpg
--test_result $(name)_top_outputs.npz
--pixel_format rgb
--mlir $(workdir)/transformed.mlir
mlir_calibration:
run_calibration.py $(workdir)/transformed.mlir
--dataset $(imagenet2012_mlir_cali_set)
--input_num 100
-o $(workdir)/$(name).calitable
BM1684X:
deploy:
- model_deploy.py --mlir $(workdir)/transformed.mlir
--quantize F32
--chip $(target)
--test_input $(workdir)/$(name)_in_f32.npz
--test_reference $(name)_top_outputs.npz
--tolerance 0.90,0.90
--model $(workdir)/$(name)_bm1684x_f32.bmodel
- model_deploy.py --mlir $(workdir)/transformed.mlir
--quantize INT8
--calibration_table $(workdir)/$(name).calitable
--quant_input
--quant_output
--chip $(target)
--test_input $(workdir)/$(name)_in_f32.npz
--test_reference $(name)_top_outputs.npz
--tolerance 0.85,0.45
--model $(workdir)/$(name)_bm1684x_int8_sym.bmodel
- model_deploy.py --mlir $(workdir)/transformed.mlir
--quantize INT8
--asymmetric
--calibration_table $(workdir)/$(name).calitable
--chip $(target)
--test_input $(workdir)/$(name)_in_f32.npz
--test_reference $(name)_top_outputs.npz
--tolerance 0.90,0.55
--model $(workdir)/$(name)_bm1684x_int8_asym.bmodel