Skip to content

Commit f8136d7

Browse files
authored
2023.1 ai kit itex get started example fix (#1338)
* Fix the typo * Update ResNet50_Inference.ipynb
1 parent f661725 commit f8136d7

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

AI-and-Analytics/Getting-Started-Samples/Intel_Extension_For_TensorFlow_GettingStarted/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Please follow bellow steps to setup GPU environment.
3838
3. Activate the created conda env: ```$source activate user-tensorflow-gpu ```
3939
4. Install the required packages: ```(user-tensorflow-gpu) $pip install tensorflow_hub ipykernel ```
4040
5. Deactivate conda env: ```(user-tensorflow-gpu)$conda deactivate ```
41-
6. Register the kernel to Jupyter NB: ``` $~/.conda/envs/user-tensorflowgpu/bin/python -m ipykernel install --user --name=user-tensorflow-gpu ```
41+
6. Register the kernel to Jupyter NB: ``` $~/.conda/envs/user-tensorflow-gpu/bin/python -m ipykernel install --user --name=user-tensorflow-gpu ```
4242

4343
Once users finish GPU environment setup, please do the same steps but remove "-gpu" from above steps.
4444
In the end, you will have two new conda environments which are user-tensorflow-gpu and user-tensorflow

AI-and-Analytics/Getting-Started-Samples/Intel_Extension_For_TensorFlow_GettingStarted/ResNet50_Inference.ipynb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"metadata": {},
5252
"outputs": [],
5353
"source": [
54-
"%env ONEAPI_INSTALL=~/intel/oneapi"
54+
"%env ONEAPI_INSTALL=/opt/intel/oneapi"
5555
]
5656
},
5757
{
@@ -124,7 +124,7 @@
124124
"%%writefile run.sh\n",
125125
"#!/bin/bash\n",
126126
"source $ONEAPI_INSTALL/setvars.sh --force > /dev/null 2>&1\n",
127-
"source activate tensorflow-gpu\n",
127+
"source activate user-tensorflow-gpu\n",
128128
"echo \"########## Executing the run\"\n",
129129
"DNNL_VERBOSE=1 python infer_resnet50.py > infer_rn50_gpu.csv\n",
130130
"echo \"########## Done with the run\""
@@ -156,7 +156,7 @@
156156
"metadata": {},
157157
"source": [
158158
"#### Run on CPU via Intel TensorFlow\n",
159-
"Users also can run the same infer_resnet50.py on CPU with intel tensorflow or stock tensorflow."
159+
"Users also can run the same infer_resnet50.py on CPU with intel tensorflow or stock tensorflow. Please switch to the user-tensorflow jupyter kernel and execute again from prerequisites for CPU run"
160160
]
161161
},
162162
{
@@ -168,7 +168,7 @@
168168
"%%writefile run.sh\n",
169169
"#!/bin/bash\n",
170170
"source $ONEAPI_INSTALL/setvars.sh --force > /dev/null 2>&1\n",
171-
"source activate tensorflow\n",
171+
"source activate user-tensorflow\n",
172172
"echo \"########## Executing the run\"\n",
173173
"DNNL_VERBOSE=1 python infer_resnet50.py > infer_rn50_cpu.csv\n",
174174
"echo \"########## Done with the run\""
@@ -269,7 +269,7 @@
269269
"metadata": {},
270270
"outputs": [],
271271
"source": [
272-
"FdIndex=2"
272+
"FdIndex=0"
273273
]
274274
},
275275
{
@@ -325,7 +325,7 @@
325325
"metadata": {},
326326
"outputs": [],
327327
"source": [
328-
"onednn.breakdown(data,\"arch\",\"time\")"
328+
"onednn.breakdown(exec_data,\"arch\",\"time\")"
329329
]
330330
},
331331
{
@@ -382,7 +382,6 @@
382382
"metadata": {},
383383
"outputs": [],
384384
"source": [
385-
"os.chdir(initial_cwd)\n",
386385
"print('[CODE_SAMPLE_COMPLETED_SUCCESFULLY]')"
387386
]
388387
}

0 commit comments

Comments
 (0)