Commit c7de8115 authored by yangql's avatar yangql
Browse files

Update README.md

parent 9ad2a12b
......@@ -42,7 +42,7 @@ Imagenet-1k
## 推理
### Python版本推理
采用ONNXRuntime框架使用DCU进行推理,下面介绍如何运行python代码示例,Python示例的详细说明见Doc目录下的Tutorial_Python.md。
#### 运行示例
#### 配置环境
```python
# 进入resnet50 onnxruntime工程根目录
cd <path_to_resnet50_onnxruntime>
......@@ -50,11 +50,16 @@ cd <path_to_resnet50_onnxruntime>
# 下载模型
sh ./Resource/Models/download.sh
# 进入示例程序目录
cd Python/
# 安装依赖
pip install -r requirements.txt
```
#### 运行示例
```python
# 进入resnet50 onnxruntime工程根目录
cd <path_to_resnet50_onnxruntime>
# 进入示例程序目录
cd Python/
# 运行示例
python Classifier.py
......@@ -63,7 +68,7 @@ python Classifier.py
### C++版本推理
采用ONNXRuntime框架使用DCU进行推理,下面介绍如何运行C++代码示例,C++示例的详细说明见Doc目录下的Tutorial_Cpp.md。
#### 构建工程
```
```c++
cd <path_to_resnet50_onnxruntime>
# 下载模型
......@@ -76,7 +81,7 @@ rbuild build -d depend
```
#### 设置环境变量
将依赖库依赖加入环境变量LD_LIBRARY_PATH,在~/.bashrc中添加如下语句:
```
```c++
export LD_LIBRARY_PATH=<path_to_resnet50_onnxruntime>/depend/lib64/:$LD_LIBRARY_PATH
```
然后执行:
......@@ -85,7 +90,7 @@ source ~/.bashrc
```
#### 运行示例
```
```c++
# 进入resnet50_onnxruntime工程根目录
cd <path_to_resnet50_onnxruntime>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment