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
dcuai
dlexamples
Commits
ded86881
Commit
ded86881
authored
Jul 29, 2022
by
panning
Browse files
更新分类网络测试readme
parent
ae5cea86
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
10 deletions
+41
-10
PyTorch/Compute-Vision/Accuracy_Validation/ResNet50/README.md
...rch/Compute-Vision/Accuracy_Validation/ResNet50/README.md
+41
-10
No files found.
PyTorch/Compute-Vision/Accuracy_Validation/ResNet50/README.md
View file @
ded86881
# 介绍
# 简介
该测试用例用于ResNet50精度验证,单卡运行指令如下
# 运行示例
该测试用例可用于ResNet50/Vgg16等网络的性能测试及精度验证。
## fp32
# 单卡测试(单精度)
python3 main_acc.py --batch-size=64 --arch=resnet50 -j 6 --epochs=90 --save-path=/path/to/{save_model_dir} /path/to/{ImageNet_pytorch_data_dir}/
## fp16
## 运行
python3 main_acc.py --batch-size=64 --arch=resnet50 -j 6 --epochs=90 --amp --opt-level O1 --loss-scale=dynamic --save-path=/path/to/{save_model_dir} /path/to/{ImageNet_pytorch_data_dir}/
# 参考
```
export HIP_VISIBLE_DEVICES=0
python3 main_acc.py --batch-size=64 --arch=resnet50 -j 6 --epochs=90 --save-path=/path/to/{save_model_dir} /path/to/{ImageNet_pytorch_data_dir}/
```
# 单卡测试(混合精度)
## 运行
```
export HIP_VISIBLE_DEVICES=0
python3 main_acc.py --batch-size=64 --arch=resnet50 -j 6 --epochs=90 --amp --opt-level O1 --loss-scale=dynamic --save-path=/path/to/{save_model_dir} /path/to/{ImageNet_pytorch_data_dir}/
```
# 多卡测试(单精度)
[
https://github.com/pytorch/examples/tree/master/imagenet
](
https://github.com/pytorch/examples/tree/master/imagenet
)
## 运行
```
#single_process.sh与main_acc.py在同级目录下
mpirun --allow-run-as-root --bind-to none -np 4 single_process.sh localhost resnet50 64
```
# 参数说明
```
--arch 设置要测试的网络,可以是 resnet50/vgg16/inception_v3/mobilenet_v2等
```
# inception_v3 测试说明
inception_v3测试时需要修改部分代码,具体可参考https://developer.hpccube.com/tool/ → AI生态包→ 技术文档 → 基于pytorch的DCU深度学习测试示例文档。
# 参考
https://github.com/pytorch/examples/tree/master/imagenet
\ No newline at end of file
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