forked from charlesxzb/model-zoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
resnet34-v1-7.mlir.config.yaml
78 lines (70 loc) · 2.18 KB
/
resnet34-v1-7.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
name: resnet34-v1-7
gops: [7.345687528]
shapes:
- [1, 3, 224, 224]
precision: true
mlir_transform:
model_transform.py
--model_name $(name)
--model_def $(home)/resnet34-v1-7.onnx
--input_shapes [$(shape_param)]
--resize_dims 256,256
--mean 123.67,116.28,103.53
--scale 0.017,0.017,0.017
--test_input $(root)/dataset/samples/cat.jpg
--test_result $(name)_top_outputs.npz
--pixel_format rgb
--keep_aspect_ratio
--mlir $(workdir)/transformed.mlir
mlir_calibration:
run_calibration.py $(workdir)/transformed.mlir
--dataset $(imagenet2012_mlir_cali_set)
--input_num 100
-o $(workdir)/cali_table
BM1684X:
deploy:
- model_deploy.py --mlir $(workdir)/transformed.mlir
--quantize F32
--chip bm1684x
--tolerance 0.99,0.99
--test_input $(workdir)/$(name)_in_f32.npz
--test_reference $(name)_top_outputs.npz
--model $(workdir)/$(name)_bm1684x_f32.bmodel
- model_deploy.py --mlir $(workdir)/transformed.mlir
--quantize INT8
--calibration_table $(workdir)/cali_table
--quant_input
--quant_output
--chip bm1684x
--test_input $(workdir)/$(name)_in_f32.npz
--test_reference $(name)_top_outputs.npz
--tolerance 0.80,0.76
--model $(workdir)/$(name)_bm1684x_int8_sym.bmodel
- model_deploy.py --mlir $(workdir)/transformed.mlir
--quantize INT8
--asymmetric
--calibration_table $(workdir)/cali_table
--chip bm1684x
--test_input $(workdir)/$(name)_in_f32.npz
--test_reference $(name)_top_outputs.npz
--tolerance 0.80,0.76
--model $(workdir)/$(name)_bm1684x_int8_asym.bmodel
dataset:
image_path: $(imagenet2012_val_set)
image_label: $(imagenet2012_caffe_val_ground_truth)
mean: [123.67, 116.2, 103.53]
scale: [0.017, 0.017, 0.017]
resize_dims: 256
size: 224
trans: True
bgr2rgb: True
harness:
type: topk
args:
- name: FP32
bmodel: $(workdir)/$(name)_bm1684x_f32.bmodel
- name: INT8
bmodel: $(workdir)/$(name)_bm1684x_int8_sym.bmodel
- name: INT8
bmodel: $(workdir)/$(name)_bm1684x_int8_asym.bmodel