You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ We have standardized on [Git LFS (Large File Storage)](https://git-lfs.github.co
10
10
11
11
## Models
12
12
#### Read the [Usage](#usage-) section below for more details on the file formats in the ONNX Model Zoo (.onnx, .pb, .npz), downloading multiple ONNX models through [Git LFS command line](#gitlfs-), and starter Python code for validating your ONNX model using test data.
13
+
#### INT8 models are generated by [Intel® Neural Compressor](https://github.com/intel/neural-compressor), read the [Introduction](https://github.com/intel/neural-compressor/blob/master/README.md) to know how to use it to quantize ONNX model.
> Compared with the fp32 AlextNet, int8 AlextNet's Top-1 accuracy drop ratio is 0.22%, Top-5 accuracy drop ratio is 0.05% and performance improvement is 2.26x.
15
+
>
16
+
> **Note**
17
+
>
18
+
> Different preprocess methods will lead to different accuracies, the accuracy in table depends on this specific [preprocess method](https://github.com/intel/neural-compressor/blob/master/examples/onnxrt/onnx_model_zoo/alexnet/main.py).
19
+
>
20
+
> The performance depends on the test hardware. Performance data here is collected with Intel® Xeon® Platinum 8280 Processor, 1s 4c per instance, CentOS Linux 8.3, data batch size is 1.
12
21
13
22
## Description
14
23
AlexNet is the name of a convolutional neural network for classification,
@@ -18,9 +27,6 @@ Differences:
18
27
- not training with the relighting data-augmentation;
19
28
- initializing non-zero biases to 0.1 instead of 1 (found necessary for training, as initialization to 1 gave flat loss).
20
29
21
-
### Paper
22
-
[ImageNet Classification with Deep Convolutional Neural Networks](https://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf)
@@ -56,5 +62,38 @@ This model obtains a top-1 accuracy 57.1% and a top-5 accuracy
56
62
(Using the average of 10 crops, (4 + 1 center) * 2 mirror,
57
63
should obtain a bit higher accuracy.)
58
64
65
+
## Quantization
66
+
AlexNet-int8 is obtained by quantizing fp32 AlexNet model. We use [Intel® Neural Compressor](https://github.com/intel/neural-compressor) with onnxruntime backend to perform quantization. View the [instructions](https://github.com/intel/neural-compressor/blob/master/examples/onnxrt/onnx_model_zoo/alexnet/README.md) to understand how to use Intel® Neural Compressor for quantization.
Make sure to specify the appropriate dataset path in the configuration file.
79
+
```bash
80
+
bash run_tuning.sh --input_model=path/to/model \ # model path as *.onnx
81
+
--config=alexnet.yaml \
82
+
--data_path=/path/to/imagenet \
83
+
--label_path=/path/to/imagenet/label \
84
+
--output_model=path/to/save
85
+
```
86
+
87
+
## References
88
+
*[ImageNet Classification with Deep Convolutional Neural Networks](https://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf)
> Compared with the fp32 CaffeNet, int8 CaffeNet's Top-1 accuracy drop ratio is 0.09%, Top-5 accuracy drop ratio is 0.13% and performance improvement is 3.08x.
15
+
>
16
+
> **Note**
17
+
>
18
+
> Different preprocess methods will lead to different accuracies, the accuracy in table depends on this specific [preprocess method](https://github.com/intel/neural-compressor/blob/master/examples/onnxrt/onnx_model_zoo/caffenet/main.py).
19
+
>
20
+
> The performance depends on the test hardware. Performance data here is collected with Intel® Xeon® Platinum 8280 Processor, 1s 4c per instance, CentOS Linux 8.3, data batch size is 1.
12
21
13
22
## Description
14
23
CaffeNet a variant of AlexNet.
@@ -19,9 +28,6 @@ Differences:
19
28
- not training with the relighting data-augmentation;
20
29
- the order of pooling and normalization layers is switched (in CaffeNet, pooling is done before normalization).
21
30
22
-
### Paper
23
-
[ImageNet Classification with Deep Convolutional Neural Networks](https://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf)
@@ -57,5 +63,38 @@ This model obtains a top-1 accuracy 57.4% and a top-5 accuracy
57
63
(Using the average of 10 crops, (4 + 1 center) * 2 mirror,
58
64
should obtain a bit higher accuracy still.)
59
65
66
+
## Quantization
67
+
CaffeNet-int8 is obtained by quantizing fp32 CaffeNet model. We use [Intel® Neural Compressor](https://github.com/intel/neural-compressor) with onnxruntime backend to perform quantization. View the [instructions](https://github.com/intel/neural-compressor/blob/master/examples/onnxrt/onnx_model_zoo/caffenet/README.md) to understand how to use Intel® Neural Compressor for quantization.
Make sure to specify the appropriate dataset path in the configuration file.
80
+
```bash
81
+
bash run_tuning.sh --input_model=path/to/model \ # model path as *.onnx
82
+
--config=caffenet.yaml \
83
+
--data_path=/path/to/imagenet \
84
+
--label_path=/path/to/imagenet/label \
85
+
--output_model=path/to/save
86
+
```
87
+
88
+
## References
89
+
*[ImageNet Classification with Deep Convolutional Neural Networks](https://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf)
0 commit comments