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_migraphx
Commits
83d43b3f
Commit
83d43b3f
authored
Jun 19, 2023
by
liucong
Browse files
完善工程
parent
a92e6ecd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
45 deletions
+2
-45
CMakeLists.txt
CMakeLists.txt
+0
-3
README.md
README.md
+2
-42
No files found.
CMakeLists.txt
View file @
83d43b3f
...
@@ -26,10 +26,7 @@ set(LIBRARY opencv_core
...
@@ -26,10 +26,7 @@ set(LIBRARY opencv_core
opencv_imgproc
opencv_imgproc
opencv_imgcodecs
opencv_imgcodecs
opencv_dnn
opencv_dnn
migraphx_ref
migraphx
migraphx
migraphx_c
migraphx_device
migraphx_gpu
migraphx_gpu
migraphx_onnx
)
migraphx_onnx
)
link_libraries
(
${
LIBRARY
}
)
link_libraries
(
${
LIBRARY
}
)
...
...
README.md
View file @
83d43b3f
...
@@ -39,22 +39,12 @@ pip install -r requirements.txt
...
@@ -39,22 +39,12 @@ pip install -r requirements.txt
### 运行示例
### 运行示例
在Python目录下执行如下命令运行该示例程序:
执行如下示例,输出分类结果。
```
python
```
python
python
Classifier
.
py
python
Classifier
.
py
```
```
输出结果中,每个值分别对应每个label的输出值。
```
[-2.07137913e-02 2.25237548e-01 -1.98313940e+00 -2.97359991e+00
-1.61100197e+00 4.24269080e-01 -9.02939081e-01 1.21229446e+00
...
-2.69769251e-01 -4.28011447e-01 1.25102985e+00 9.06333506e-01
-1.08657002e-01 3.15954179e-01 1.94901276e+00 -5.70572793e-01]
```
## C++版本推理
## C++版本推理
下面介绍如何运行C++代码示例,C++示例的详细说明见Doc目录下的Tutorial_Cpp.md。
下面介绍如何运行C++代码示例,C++示例的详细说明见Doc目录下的Tutorial_Cpp.md。
...
@@ -74,11 +64,6 @@ cd <path_to_resnet50_migraphx>
...
@@ -74,11 +64,6 @@ cd <path_to_resnet50_migraphx>
sh
.
/
3
rdParty
/
InstallOpenCVDependences
.
sh
sh
.
/
3
rdParty
/
InstallOpenCVDependences
.
sh
```
```
### 修改CMakeLists.txt
如果使用ubuntu系统,需要修改CMakeLists.txt中依赖库路径:
将"${CMAKE_CURRENT_SOURCE_DIR}/depend/lib64/"修改为"${CMAKE_CURRENT_SOURCE_DIR}/depend/lib/"
### 安装OpenCV并构建工程
### 安装OpenCV并构建工程
...
@@ -90,18 +75,10 @@ rbuild build -d depend
...
@@ -90,18 +75,10 @@ rbuild build -d depend
将依赖库依赖加入环境变量LD_LIBRARY_PATH,在~/.bashrc中添加如下语句:
将依赖库依赖加入环境变量LD_LIBRARY_PATH,在~/.bashrc中添加如下语句:
**Centos**
:
```
```
export LD_LIBRARY_PATH=<path_to_resnet50_migraphx>/depend/lib64/:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=<path_to_resnet50_migraphx>/depend/lib64/:$LD_LIBRARY_PATH
```
```
**Ubuntu**
:
```
export LD_LIBRARY_PATH=<path_to_resnet50_migraphx>/depend/lib/:$LD_LIBRARY_PATH
```
然后执行:
然后执行:
```
```
...
@@ -115,29 +92,12 @@ source ~/.bashrc
...
@@ -115,29 +92,12 @@ source ~/.bashrc
cd
<
path_to_resnet50_migraphx
>
cd
<
path_to_resnet50_migraphx
>
# 进入build目录
# 进入build目录
cd
.
/
build
/
cd
build
/
# 执行示例程序
# 执行示例程序
.
/
ResNet50
.
/
ResNet50
```
```
输出结果中,每个值分别对应每个label的输出值。
```
label:0,confidence:-0.020714
label:1,confidence:0.225238
label:2,confidence:-1.983140
label:3,confidence:-2.973601
label:4,confidence:-1.611002
label:5,confidence:0.424268
...
label:995,confidence:0.906333
label:996,confidence:-0.108658
label:997,confidence:0.315955
label:998,confidence:1.949013
label:999,confidence:-0.570573
```
## 源码仓库及问题反馈
## 源码仓库及问题反馈
https://developer.hpccube.com/codes/modelzoo/resnet50_migraphx
https://developer.hpccube.com/codes/modelzoo/resnet50_migraphx
...
...
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