Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_onnxruntime
Commits
c7de8115
Commit
c7de8115
authored
Oct 20, 2023
by
yangql
Browse files
Update README.md
parent
9ad2a12b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
README.md
README.md
+12
-7
No files found.
README.md
View file @
c7de8115
...
...
@@ -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
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment