".github/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "92149c58834ccf24d82a15f756decd0d1e613ed3"
Commit 65ff3f3e authored by qianyj's avatar qianyj
Browse files

update TensorFlow test code

parent db6b7787
...@@ -28,11 +28,15 @@ ...@@ -28,11 +28,15 @@
## 运行 ## 运行
mpirun -np 4 --hostfile hostfile -mca btl self,tcp --bind-to none scripts-run/single_process.sh mpirun -np 4 --hostfile hostfile -mca btl self,tcp --bind-to none scripts-run/single_process.sh
hostfile格式参考:
node1 slots=4 # 测试说明
node2 slots=4
hostfile格式参考:
node1 slots=4
node2 slots=4
上面多卡测试方法默认每节点4卡
# 参考资料 # 参考资料
[https://github.com/tensorflow/benchmarks/tree/master/scripts/tf_cnn_benchmarks](https://github.com/tensorflow/benchmarks/tree/master/scripts/tf_cnn_benchmarks) [https://github.com/tensorflow/benchmarks/tree/master/scripts/tf_cnn_benchmarks](https://github.com/tensorflow/benchmarks/tree/master/scripts/tf_cnn_benchmarks)
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
# 多卡测试 (单精度) # 多卡测试 (单精度)
## 运行 ## 运行
# sed指令只需要执行一次,添加支持多卡运行的代码 # sed指令只需要执行一次,添加支持多卡运行的代码
sed -i '99 r configfile' official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py sed -i '99 r configfile' official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py
...@@ -30,6 +31,7 @@ ...@@ -30,6 +31,7 @@
# 多卡测试 (混合精度) # 多卡测试 (混合精度)
## 运行 ## 运行
# sed指令只需要执行一次,添加支持多卡运行的代码 # sed指令只需要执行一次,添加支持多卡运行的代码
sed -i '99 r configfile' official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py sed -i '99 r configfile' official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py
...@@ -37,15 +39,17 @@ ...@@ -37,15 +39,17 @@
export PYTHONPATH=/path/to/tensorflow/model:$PYTHONPATH export PYTHONPATH=/path/to/tensorflow/model:$PYTHONPATH
mpirun -np $np --hostfile hostfile -mca btl self,tcp --bind-to none scripts-run/single_process.sh mpirun -np $np --hostfile hostfile -mca btl self,tcp --bind-to none scripts-run/single_process.sh
## 测试说明 # 测试说明
多卡测试时需要修改部分代码,具体可参考https://tensorflow.google.cn/guide/migrate/multi_worker_cpu_gpu_training?hl=en 多卡测试时需要修改部分代码,具体可参考https://tensorflow.google.cn/guide/migrate/multi_worker_cpu_gpu_training?hl=en
hostfile格式参考: hostfile格式参考:
node1 slots=4 node1 slots=4
node2 slots=4 node2 slots=4
nodefile格式参考(与hostfile文件内保持一致,用于构造TF_CONFIG): nodefile格式参考(与hostfile文件内保持一致,用于构造TF_CONFIG):
node1 node1
node2 node2
......
# 简介 # 简介
该测试用例用于TensorFlow分类模型性能测试,使用的数据集是imagenet。 该测试用例用于TensorFlow分类模型性能测试,使用的数据集是imagenet。
# 运行 # 运行
...@@ -29,10 +29,12 @@ ...@@ -29,10 +29,12 @@
多卡测试时需要修改部分代码,具体可参考https://tensorflow.google.cn/guide/migrate/multi_worker_cpu_gpu_training?hl=en 多卡测试时需要修改部分代码,具体可参考https://tensorflow.google.cn/guide/migrate/multi_worker_cpu_gpu_training?hl=en
hostfile格式参考: hostfile格式参考:
node1 slots=4 node1 slots=4
node2 slots=4 node2 slots=4
nodefile格式参考(与hostfile文件内保持一致,用于构造TF_CONFIG): nodefile格式参考(与hostfile文件内保持一致,用于构造TF_CONFIG):
node1 node1
node2 node2
......
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