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_tensorflow
Commits
40217c21
Commit
40217c21
authored
Sep 18, 2023
by
qianyj
Browse files
Update files
parent
6c4af06f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
README.md
README.md
+7
-7
model.properties
model.properties
+1
-1
No files found.
README.md
View file @
40217c21
...
@@ -82,7 +82,7 @@ tfrecord-imagenet
...
@@ -82,7 +82,7 @@ tfrecord-imagenet
sh /opt/dtk/.hip/replace_origin.sh
sh /opt/dtk/.hip/replace_origin.sh
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
在resnet_ctl_imagenet_main.py中添加环境变量os.environ["XLA_FLAGS"]="--xla_gpu_cuda_data_dir=/opt/dtk/amdgcn/bitcode
”
在resnet_ctl_imagenet_main.py中添加环境变量os.environ["XLA_FLAGS"]="--xla_gpu_cuda_data_dir=/opt/dtk/amdgcn/bitcode
"
TF_XLA_FLAGS="--tf_xla_auto_jit=1" python3 official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py --data_dir=/path/to/{ImageNet-tensorflow_data_dir} --model_dir=/path/to/{model_save_dir} --batch_size=128 --num_gpus=1 --use_synthetic_data=false --train_epochs=90 --dtype=fp32
TF_XLA_FLAGS="--tf_xla_auto_jit=1" python3 official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py --data_dir=/path/to/{ImageNet-tensorflow_data_dir} --model_dir=/path/to/{model_save_dir} --batch_size=128 --num_gpus=1 --use_synthetic_data=false --train_epochs=90 --dtype=fp32
#### 单机四卡训练指令:
#### 单机四卡训练指令:
...
@@ -95,7 +95,7 @@ tfrecord-imagenet
...
@@ -95,7 +95,7 @@ tfrecord-imagenet
sh /opt/dtk/.hip/replace_origin.sh
sh /opt/dtk/.hip/replace_origin.sh
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
在resnet_ctl_imagenet_main.py中添加环境变量os.environ["XLA_FLAGS"]="--xla_gpu_cuda_data_dir=/opt/dtk/amdgcn/bitcode
”
在resnet_ctl_imagenet_main.py中添加环境变量os.environ["XLA_FLAGS"]="--xla_gpu_cuda_data_dir=/opt/dtk/amdgcn/bitcode
"
TF_XLA_FLAGS="--tf_xla_auto_jit=1" python3 official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py --data_dir=/path/to/{ImageNet-tensorflow_data_dir} --model_dir=/path/to/{model_save_dir} --batch_size=512 --num_gpus=4 --train_epochs=90 --use_synthetic_data=false --dtype=fp32
TF_XLA_FLAGS="--tf_xla_auto_jit=1" python3 official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py --data_dir=/path/to/{ImageNet-tensorflow_data_dir} --model_dir=/path/to/{model_save_dir} --batch_size=512 --num_gpus=4 --train_epochs=90 --use_synthetic_data=false --dtype=fp32
#### 多机多卡训练指令(以单机四卡模拟四卡四进程为例):
#### 多机多卡训练指令(以单机四卡模拟四卡四进程为例):
...
@@ -113,7 +113,7 @@ sed指令只需要执行一次,添加支持多卡运行的代码
...
@@ -113,7 +113,7 @@ sed指令只需要执行一次,添加支持多卡运行的代码
sh /opt/dtk/.hip/replace_origin.sh
sh /opt/dtk/.hip/replace_origin.sh
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
在resnet_ctl_imagenet_main.py中添加环境变量os.environ["XLA_FLAGS"]="--xla_gpu_cuda_data_dir=/opt/dtk/amdgcn/bitcode
”
在resnet_ctl_imagenet_main.py中添加环境变量os.environ["XLA_FLAGS"]="--xla_gpu_cuda_data_dir=/opt/dtk/amdgcn/bitcode
"
mpirun -np 4 --hostfile hostfile -mca btl self,tcp --allow-run-as-root --bind-to none scripts-run/single_process_xla.sh
mpirun -np 4 --hostfile hostfile -mca btl self,tcp --allow-run-as-root --bind-to none scripts-run/single_process_xla.sh
### fp16训练
### fp16训练
...
@@ -128,7 +128,7 @@ sed指令只需要执行一次,添加支持多卡运行的代码
...
@@ -128,7 +128,7 @@ sed指令只需要执行一次,添加支持多卡运行的代码
sh /opt/dtk/.hip/replace_origin.sh
sh /opt/dtk/.hip/replace_origin.sh
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
在resnet_ctl_imagenet_main.py中添加环境变量os.environ["XLA_FLAGS"]="--xla_gpu_cuda_data_dir=/opt/dtk/amdgcn/bitcode
”
在resnet_ctl_imagenet_main.py中添加环境变量os.environ["XLA_FLAGS"]="--xla_gpu_cuda_data_dir=/opt/dtk/amdgcn/bitcode
"
TF_XLA_FLAGS="--tf_xla_auto_jit=1" python3 official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py --data_dir=/path/to/{ImageNet-tensorflow_data_dir} --model_dir=/path/to/{model_save_dir} --batch_size=128 --num_gpus=1 --train_epochs=90 --use_synthetic_data=false --dtype=fp16
TF_XLA_FLAGS="--tf_xla_auto_jit=1" python3 official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py --data_dir=/path/to/{ImageNet-tensorflow_data_dir} --model_dir=/path/to/{model_save_dir} --batch_size=128 --num_gpus=1 --train_epochs=90 --use_synthetic_data=false --dtype=fp16
#### 单机四卡训练指令
#### 单机四卡训练指令
...
@@ -142,7 +142,7 @@ sed指令只需要执行一次,添加支持多卡运行的代码
...
@@ -142,7 +142,7 @@ sed指令只需要执行一次,添加支持多卡运行的代码
sh /opt/dtk/.hip/replace_origin.sh
sh /opt/dtk/.hip/replace_origin.sh
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
在resnet_ctl_imagenet_main.py中添加环境变量os.environ["XLA_FLAGS"]="--xla_gpu_cuda_data_dir=/opt/dtk/amdgcn/bitcode
”
在resnet_ctl_imagenet_main.py中添加环境变量os.environ["XLA_FLAGS"]="--xla_gpu_cuda_data_dir=/opt/dtk/amdgcn/bitcode
"
TF_XLA_FLAGS="--tf_xla_auto_jit=1" python3 official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py --data_dir=/path/to/{ImageNet-tensorflow_data_dir} --model_dir=/path/to/{model_save_dir} --batch_size=512 --num_gpus=4 --train_epochs=90 --use_synthetic_data=false --dtype=fp16
TF_XLA_FLAGS="--tf_xla_auto_jit=1" python3 official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py --data_dir=/path/to/{ImageNet-tensorflow_data_dir} --model_dir=/path/to/{model_save_dir} --batch_size=512 --num_gpus=4 --train_epochs=90 --use_synthetic_data=false --dtype=fp16
#### 多机多卡训练指令(以单机四卡模拟四卡四进程为例)
#### 多机多卡训练指令(以单机四卡模拟四卡四进程为例)
...
@@ -162,11 +162,11 @@ sed指令只需要执行一次,添加支持多卡运行的代码
...
@@ -162,11 +162,11 @@ sed指令只需要执行一次,添加支持多卡运行的代码
sh /opt/dtk/.hip/replace_origin.sh
sh /opt/dtk/.hip/replace_origin.sh
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
在resnet_ctl_imagenet_main.py中添加环境变量os.environ["XLA_FLAGS"]="--xla_gpu_cuda_data_dir=/opt/dtk/amdgcn/bitcode
”
在resnet_ctl_imagenet_main.py中添加环境变量os.environ["XLA_FLAGS"]="--xla_gpu_cuda_data_dir=/opt/dtk/amdgcn/bitcode
"
mpirun -np 4 --hostfile hostfile -mca btl self,tcp --allow-run-as-root --bind-to none scripts-run/single_process_xla.sh
mpirun -np 4 --hostfile hostfile -mca btl self,tcp --allow-run-as-root --bind-to none scripts-run/single_process_xla.sh
##
性能和准确率数据
##
精度
测试数据:
[
ImageNet的测试数据集
](
https://image-net.org/
"ImageNet数据集官网"
)
,使用的加速卡:DCU-Z00-16G
测试数据:
[
ImageNet的测试数据集
](
https://image-net.org/
"ImageNet数据集官网"
)
,使用的加速卡:DCU-Z00-16G
| 卡数 | batch size | 类型 | Accuracy | 是否打开xla | 进程数 |
| 卡数 | batch size | 类型 | Accuracy | 是否打开xla | 进程数 |
...
...
model.properties
View file @
40217c21
...
@@ -5,6 +5,6 @@ modelName=resnet50_tensorflow2
...
@@ -5,6 +5,6 @@ modelName=resnet50_tensorflow2
# 模型描述
# 模型描述
modelDescription
=
resnet50_tensorflow2是一个用于图像分类的深度学习模型
modelDescription
=
resnet50_tensorflow2是一个用于图像分类的深度学习模型
# 应用场景
# 应用场景
appScenario
=
推理,训练,
图像分类,cv
appScenario
=
推理,训练,
制造,政府,医疗,科研
# 框架类型
# 框架类型
frameType
=
Tensorflow
frameType
=
Tensorflow
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