Skip to content

Commit c5aa641

Browse files
authored
Updating model zoo examples (#2271)
1 parent bd89231 commit c5aa641

File tree

5 files changed

+14
-162
lines changed

5 files changed

+14
-162
lines changed

examples/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ A wide variety of examples are provided to demonstrate the usage of Intel® Exte
99
|[BERT Training for Classifying Text](./train_bert)|BERT training with Intel® Extension for TensorFlow* on Intel CPU or GPU.<br>Use the TensorFlow official example without code change.|CPU & GPU|
1010
|[Speed up Inference of Inception v4 by Advanced Automatic Mixed Precision via Docker Container or Bare Metal](./infer_inception_v4_amp)|Test and compare the performance of inference with FP32 and Advanced Automatic Mixed Precision (AMP) (mix BF16/FP16 and FP32).<br>Shows the acceleration of inference by Advanced AMP on Intel CPU and GPU via Docker Container or Bare Metal.|CPU & GPU|
1111
|[Accelerate AlexNet by Quantization with Intel® Extension for TensorFlow*](./accelerate_alexnet_by_quantization)| An end-to-end example to show a pipeline to build up a CNN model to <br>recognize handwriting number and speed up AI model with quantization <br>by Intel® Neural Compressor and Intel® Extension for TensorFlow* on Intel GPU.|GPU|
12-
|[Accelerate Deep Learning Inference for Model Zoo Workloads on Intel CPU and GPU](./model_zoo_example)|Examples on running Model Zoo workloads on Intel CPU and GPU with the optimizations from Intel® Extension for TensorFlow*, without any code changes.|CPU & GPU|
13-
|[Quantize Inception V3 by Intel® Extension for TensorFlow* on Intel® Xeon®](./quantize_inception_v3)|An end-to-end example to show how Intel® Extension for TensorFlow* provides quantization feature by cooperating with Intel® Neural Compressor and oneDNN Graph. It will provide better quantization: better performance and accuracy loss is in controlled.|CPU & GPU|
12+
|[Accelerate Deep Learning Training and Inference for Model Zoo Workloads on Intel GPU](./model_zoo_example)|Examples on running Model Zoo workloads on Intel GPU with the optimizations from Intel® Extension for TensorFlow*.|GPU|
13+
|[Quantize Inception V3 by Intel® Extension for TensorFlow* on Intel® Xeon®](./quantize_inception_v3)|An end-to-end example to show how Intel® Extension for TensorFlow* provides quantization feature by cooperating with Intel® Neural Compressor and oneDNN Graph. It will provide better quantization: better performance and accuracy loss is in controlled.|CPU|
1414
|[ResNet50 and Mnist training with Horovod](./train_horovod)|ResNet50 and Mnist distributed training examples on Intel GPU.|GPU|
1515
|[Stable Diffusion Inference for Text2Image on Intel GPU](./stable_diffussion_inference)|Example for running Stable Diffusion Text2Image inference on Intel GPU with the optimizations from Intel® Extension for TensorFlow*.|GPU|
1616
|[Accelerate ResNet50 Training by XPUAutoShard on Intel GPU](./train_resnet50_with_autoshard)|Example on running ResNet50 training on Intel GPU with the XPUAutoShard feature.|GPU|

examples/examples.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ A wide variety of examples are provided to demonstrate the usage of Intel® Exte
99
|[BERT Training for Classifying Text](./train_bert/README.html)|BERT training with Intel® Extension for TensorFlow* on Intel CPU or GPU.<br>Use the TensorFlow official example without code change.|CPU & GPU|
1010
|[Speed up Inference of Inception v4 by Advanced Automatic Mixed Precision via Docker Container or Bare Metal](./infer_inception_v4_amp/README.html)|Test and compare the performance of inference with FP32 and Advanced Automatic Mixed Precision (AMP) (mix BF16/FP16 and FP32).<br>Shows the acceleration of inference by Advanced AMP on Intel® CPU and GPU via Docker Container or Bare Metal.|CPU & GPU|
1111
|[Accelerate AlexNet by Quantization with Intel® Extension for TensorFlow*](./accelerate_alexnet_by_quantization/README.html)| An end-to-end example to show a pipeline to build up a CNN model to <br>recognize handwriting number and speed up AI model with quantization <br>by Intel® Neural Compressor and Intel® Extension for TensorFlow* on Intel GPU.|GPU|
12-
|[Accelerate Deep Learning Inference for Model Zoo Workloads on Intel CPU and GPU](./model_zoo_example/README.html)|Examples on running Model Zoo workloads on Intel CPU and GPU with the optimizations from Intel® Extension for TensorFlow*, without any code changes.|CPU & GPU|
13-
|[Quantize Inception V3 by Intel® Extension for TensorFlow*](./quantize_inception_v3/README.html)|An end-to-end example to show how Intel® Extension for TensorFlow* provides quantization feature by cooperating with Intel® Neural Compressor and oneDNN Graph. It will provide better quantization: better performance and accuracy loss is in controlled.|CPU & GPU|
12+
|[Accelerate Deep Learning Training and Inference for Model Zoo Workloads on Intel GPU](./model_zoo_example)|Examples on running Model Zoo workloads on Intel GPU with the optimizations from Intel® Extension for TensorFlow*.|GPU|
13+
|[Quantize Inception V3 by Intel® Extension for TensorFlow* on Intel® Xeon®](./quantize_inception_v3/README.html)|An end-to-end example to show how Intel® Extension for TensorFlow* provides quantization feature by cooperating with Intel® Neural Compressor and oneDNN Graph. It will provide better quantization: better performance and accuracy loss is in controlled.|CPU|
1414
|[Mnist training with Intel® Optimization for Horovod*](./train_horovod/mnist/README.html)|Mnist distributed training example on Intel GPU. |GPU|
1515
|[ResNet50 training with Intel® Optimization for Horovod*](./train_horovod/resnet50/README.html)|ResNet50 distributed training example on Intel GPU. |GPU|
1616
|[Stable Diffusion Inference for Text2Image on Intel GPU](./stable_diffussion_inference/README.html)|Example for running Stable Diffusion Text2Image inference on Intel GPU with the optimizations from Intel® Extension for TensorFlow*. |GPU|

examples/model_zoo_example/README.md

+10-49
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,20 @@
1-
# Accelerating Deep Learning Inference for Model Zoo Workloads on Intel CPU and GPU
1+
# Accelerate Deep Learning Training and Inference for Model Zoo Workloads on Intel GPU
22

33
## Introduction
4-
This example shows the guideline to run Model Zoo workloads on Intel CPU and GPU with the optimizations from Intel® Extension for TensorFlow*, without any model code changes.
4+
This example shows the guideline to run Model Zoo workloads using TensorFlow* framework on Intel GPU with the optimizations from Intel® Extension for TensorFlow*.
55

6-
## Prerequisites
7-
For Intel CPU, refer to [Intel CPU software installation](../../docs/install/install_for_cpu.md#intel-cpu-software-installation).
8-
For Intel GPU, refer to [Intel XPU software installation](../../docs/install/install_for_xpu.md#intel-gpu-software-installation).
6+
## Quick Start Guide
97

10-
## Execute
8+
### Run Models in the Docker Container
119

12-
### Prepare the Codes
13-
```bash
14-
git clone https://github.com/IntelAI/models
15-
cd models
16-
git checkout v2.8.0
17-
```
10+
- For Intel® Data Center GPU Flex Series
1811

19-
### Sample Use cases
12+
Refer to [AI Model Zoo Containers on Flex Series](https://www.intel.com/content/www/us/en/developer/articles/containers/model-zoo-flex-series-containers.html) to run optimized Deep Learning inference workloads.
2013

14+
- For Intel® Data Center GPU Max Series
2115

22-
|Model|Mode|Model Documentation|
23-
|-|-|-|
24-
|Inception V3|Inference|[FP32](https://github.com/IntelAI/models/blob/v2.8.0/benchmarks/image_recognition/tensorflow/inceptionv3/inference/fp32/README.md) [INT8](https://github.com/IntelAI/models/blob/v2.8.0/benchmarks/image_recognition/tensorflow/inceptionv3/inference/int8/README.md)|
25-
|Inception V4|Inference|[FP32](https://github.com/IntelAI/models/blob/v2.8.0/benchmarks/image_recognition/tensorflow/inceptionv4/inference/fp32/README.md) [INT8](https://github.com/IntelAI/models/blob/v2.8.0/benchmarks/image_recognition/tensorflow/inceptionv4/inference/int8/README.md)|
26-
|ResNet50 V1.5|Inference|[FP32](https://github.com/IntelAI/models/blob/v2.8.0/benchmarks/image_recognition/tensorflow/resnet50v1_5/inference/fp32/README.md) [INT8](https://github.com/IntelAI/models/blob/v2.8.0/benchmarks/image_recognition/tensorflow/resnet50v1_5/inference/int8/README.md)|
16+
Refer to [AI Model Zoo Containers on Max Series](https://www.intel.com/content/www/us/en/developer/articles/containers/model-zoo-max-series-containers/model-zoo-max-series-containers.html) to run optimized Deep Learning training and inference workloads.
2717

28-
### Performance Optimization
29-
- FP16/BF16 INT8 Inference Optimization
18+
### Run Models on Bare Metal
3019

31-
Refer to the above FP32 model documentation, and only set one extra environment variable to enable advanced auto mixed precision Graph optimization before running inference.
32-
```bash
33-
export ITEX_AUTO_MIXED_PRECISION=1
34-
```
35-
- INT8 Inference Optimization
36-
37-
To avoid memory copy on GPU, we provide a tool to convert the const to host const for INT8 pretrained-models.
38-
39-
Take the ResNet50 v1.5 INT8 pb for example,
40-
```
41-
42-
wget https://storage.googleapis.com/intel-optimized-tensorflow/models/v1_8/resnet50v1_5_int8_pretrained_model.pb
43-
44-
python host_const.py -i <path to the frozen graph downloaded above>/resnet50v1_5_int8_pretrained_model.pb -b -o <path to save the converted frozen graph>/resnet50v1_5_int8_pretrained_model-hostconst.pb
45-
```
46-
Use the new INT8 pb for INT8 inference, After converting to the new INT8 pb.
47-
48-
## FAQ
49-
1. During the Inception V3 INT8 batch inference, if running with real data, you might encounter a message "Running out of images from dataset". It is a known issue of Model Zoo script.
50-
51-
Solution:
52-
53-
- Option 1: Please use dummy data instead.
54-
55-
- Option 2: If you want to run inference with real data, use the command below. And comment the last line of below int8_batch_inference.sh script to unspecify the warmup_steps and steps.
56-
```bash
57-
cd models
58-
vi ./quickstart/image_recognition/tensorflow/inceptionv3/inference/cpu/int8/int8_batch_inference.sh
59-
```
20+
Refer to [AI Model Zoo Examples on Intel® Data Center GPU](https://github.com/IntelAI/models/tree/master#intel-data-center-gpu-workloads) to run optimized Deep Learning training and inference workloads on bare metal.

examples/model_zoo_example/host_const.py

-49
This file was deleted.

examples/model_zoo_example/utils.py

-60
This file was deleted.

0 commit comments

Comments
 (0)