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: AI-and-Analytics/Getting-Started-Samples/LPOT-Sample-for-Tensorflow/README.md
+36-23Lines changed: 36 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
-
# `Intel(R) Low Precision Optimization Tool (LPOT)` Sample for Tensorflow
1
+
# `Intel® Low Precision Optimization Tool (LPOT)` Sample for TensorFlow*
2
2
3
3
## Background
4
-
Low-precision inference can speed up inference obviously, by converting the fp32 model to int8 or bf16 model. Intel provides Intel(R) Deep Learning Boost technology in the Second Generation Intel(R) Xeon(R) Scalable Processors and newer Xeon(R), which supports to speed up int8 and bf16 model by hardware.
4
+
Low-precision inference can speed up inference obviously, by converting the fp32 model to int8 or bf16 model. Intel provides Intel® Deep Learning Boost technology in the Second Generation Intel® Xeon® Scalable Processors and newer Xeon®, which supports to speed up int8 and bf16 model by hardware.
5
5
6
-
Intel(R) Low Precision Optimization Tool (LPOT) helps the user to simplify the processing to convert the fp32 model to int8/bf16.
6
+
Intel® Low Precision Optimization Tool (LPOT) helps the user to simplify the processing to convert the fp32 model to int8/bf16.
7
7
8
8
At the same time, LPOT will tune the quanization method to reduce the accuracy loss, which is a big blocker for low-precision inference.
9
9
10
-
LPOT is released in Intel(R) AI Analytics Toolkit and works with Intel(R) Optimization of Tensorflow*.
10
+
LPOT is released in Intel® AI Analytics Toolkit and works with Intel® Optimization of TensorFlow*.
11
11
12
12
Please refer to the official website for detailed info and news: [https://github.com/intel/lp-opt-tool](https://github.com/intel/lp-opt-tool)
13
13
@@ -21,20 +21,20 @@ Third party program Licenses can be found here: [third-party-programs.txt](https
21
21
## Purpose
22
22
This sample will show a whole process to build up a CNN model to recognize handwriting number and speed up it by LPOT.
23
23
24
-
We will learn how to train a CNN model based on Keras with Tensorflow, use LPOT to quantize the model and compare the performance to understand the benefit of LPOT.
24
+
We will learn how to train a CNN model based on Keras with TensorFlow, use LPOT to quantize the model and compare the performance to understand the benefit of LPOT.
25
25
26
26
## Key Implementation Details
27
27
28
-
- Use Keras on Tensorflow to build and train the CNN model.
28
+
- Use Keras on TensorFlow to build and train the CNN model.
29
29
30
30
31
31
- Define function and class for LPOT to quantize the CNN model.
32
32
33
-
The LPOT can run on any Intel(R) CPU to quantize the AI model.
33
+
The LPOT can run on any Intel® CPU to quantize the AI model.
34
34
35
35
The quantized AI model has better inference performance than the FP32 model on Intel CPU.
36
36
37
-
Specifically, it could be speeded up by the Second Generation Intel(R) Xeon(R) Scalable Processors and newer Xeon(R).
37
+
Specifically, it could be speeded up by the Second Generation Intel® Xeon® Scalable Processors and newer Xeon®.
38
38
39
39
40
40
- Test the performance of the FP32 model and INT8 (quantization) model.
@@ -45,22 +45,35 @@ We will learn how to train a CNN model based on Keras with Tensorflow, use LPOT
45
45
| Optimized for | Description
46
46
|:--- |:---
47
47
| OS | Linux* Ubuntu* 18.04
48
-
| Hardware | The Second Generation Intel(R) Xeon(R) Scalable processor family or newer
49
-
| Software | Intel(R) oneAPI AI Analytics Toolkit 2021.1 or newer
50
-
| What you will learn | How to use LPOT tool to quantize the AI model based on Tensorflow and speed up the inference on Intel(R) Xeon(R) CPU
48
+
| Hardware | The Second Generation Intel® Xeon® Scalable processor family or newer
49
+
| Software | Intel® oneAPI AI Analytics Toolkit 2021.1 or newer
50
+
| What you will learn | How to use LPOT tool to quantize the AI model based on TensorFlow and speed up the inference on Intel® Xeon® CPU
51
51
| Time to complete | 10 minutes
52
52
53
53
## Running Environment
54
54
55
-
### Running in Devcloud
55
+
### Running Samples In DevCloud (Optional)
56
56
57
-
If running a sample in the Intel DevCloud, please follow the below steps to build the python environment. Also, remember that you must specify the compute node (CPU) as well as whether to run in batch or interactive mode. For more information, see the [Intel(R) oneAPI AI Analytics Toolkit Get Started Guide](https://devcloud.intel.com/oneapi/get-started/analytics-toolkit/)
57
+
### Run in Interactive Mode
58
+
This sample runs in a Jupyter notebook. See [Running the Sample](#running-the-sample).
59
+
60
+
### Request a Compute Node
61
+
In order to run on the DevCloud, you need to request a compute node using node properties such as: `gpu`, `xeon`, `fpga_compile`, `fpga_runtime` and others. For more information about the node properties, execute the `pbsnodes` command.
62
+
This node information must be provided when submitting a job to run your sample in batch mode using the qsub command. When you see the qsub command in the Run section of the [Hello World instructions](https://devcloud.intel.com/oneapi/get_started/aiAnalyticsToolkitSamples/), change the command to fit the node you are using. Nodes which are in bold indicate they are compatible with this sample:
Please make sure the local server is installed with Ubuntu 18.04 and the following software as below guide.
62
75
63
-
For hardware, it's recommended to choose the Second Generation Intel(R) Xeon(R) Scalable Processors and newer Xeon(R). It will speed up the quantized model significantly.
76
+
For hardware, it's recommended to choose the Second Generation Intel® Xeon® Scalable Processors and newer Xeon® processors. It will speed up the quantized model significantly.
64
77
65
78
## Prepare Software Environment
66
79
@@ -69,15 +82,15 @@ For hardware, it's recommended to choose the Second Generation Intel(R) Xeon(R)
69
82
70
83
For the devcloud user, it is already installed. Please skip it.
71
84
72
-
Please install Intel(R) AI Analytics Toolkit by referring to [Intel(R) AI Analytics Toolkit Powered by oneAPI](
85
+
Please install Intel® AI Analytics Toolkit by referring to [Intel® AI Analytics Toolkit Powered by oneAPI](
In a web browser, open link: **http://yyy:8888/?token=146761d9317552c43e0d6b8b6b9e1108053d465f6ca32fca**. Click 'lpot_sample_tensorflow.ipynb' to start up the sample.
181
+
In a web browser, open link: **http://yyy:8888/?token=146761d9317552c43e0d6b8b6b9e1108053d465f6ca32fca**. Click 'lpot_sample_TensorFlow.ipynb' to start up the sample.
169
182
170
183
### Run
171
184
172
-
Next, all of pratice of the sample is running in Jupyter Notebook.
185
+
Next, all of practice of the sample is running in Jupyter Notebook.
0 commit comments