Commit e7b3f4b1 authored by qianyj's avatar qianyj
Browse files

Update README

parent a11bd1cb
......@@ -75,24 +75,28 @@ tfrecord-imagenet
不打开xla:
export PYTHONPATH=/path/to/resnet50_tensorFlow:$PYTHONPATH
export PYTHONPATH=/home/resnet50_tensorFlow:$PYTHONPATH
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
打开xla:
export PYTHONPATH=/path/to/resnet50_tensorflow:$PYTHONPATH
TF_XLA_FLAGS="--tf_xla_auto_jit=2" 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
sh /opt/dtk/.hip/replace_origin.sh
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
在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
#### 单机四卡训练指令:
不打开xla:
export PYTHONPATH=/path/to/resnet50_tensorflow:$PYTHONPATH
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
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 --use_synthetic_data=false --train_epochs=90 --dtype=fp32
打开xla:
export PYTHONPATH=/path/to/resnet50_tensorflow:$PYTHONPATH
TF_XLA_FLAGS="--tf_xla_auto_jit=2" 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
sh /opt/dtk/.hip/replace_origin.sh
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
在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
#### 多机多卡训练指令(以单机四卡模拟四卡四进程为例):
......@@ -102,12 +106,14 @@ sed指令只需要执行一次,添加支持多卡运行的代码
不打开xla:
export PYTHONPATH=/path/to/resnet50_tensorflow:$PYTHONPATH
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
mpirun -np 4 --hostfile hostfile -mca btl self,tcp --allow-run-as-root --bind-to none scripts-run/single_process.sh
打开xla:
export PYTHONPATH=/path/to/resnet50_tensorflow:$PYTHONPATH
sh /opt/dtk/.hip/replace_origin.sh
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
在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
### fp16训练
......@@ -115,24 +121,28 @@ sed指令只需要执行一次,添加支持多卡运行的代码
不打开xla:
export PYTHONPATH=/path/to/resnet50_tensorFlow:$PYTHONPATH
export PYTHONPATH=/home/resnet50_tensorFlow:$PYTHONPATH
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=fp16
打开xla:
export PYTHONPATH=/path/to/resnet50_tensorflow:$PYTHONPATH
sh /opt/dtk/.hip/replace_origin.sh
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
在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=2" 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
#### 单机四卡训练指令
不打开xla:
export PYTHONPATH=/path/to/resnet50_tensorflow:$PYTHONPATH
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
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
打开xla:
export PYTHONPATH=/path/to/resnet50_tensorflow:$PYTHONPATH
sh /opt/dtk/.hip/replace_origin.sh
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
在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=2" 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
#### 多机多卡训练指令(以单机四卡模拟四卡四进程为例)
......@@ -145,12 +155,14 @@ sed指令只需要执行一次,添加支持多卡运行的代码
不打开xla:
export PYTHONPATH=/path/to/resnet50_tensorflow:$PYTHONPATH
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
mpirun -np 4 --hostfile hostfile -mca btl self,tcp --allow-run-as-root --bind-to none scripts-run/single_process.sh
打开xla:
export PYTHONPATH=/path/to/resnet50_tensorflow:$PYTHONPATH
sh /opt/dtk/.hip/replace_origin.sh
export PYTHONPATH=/home/resnet50_tensorflow:$PYTHONPATH
在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
......
# 模型唯一标识
modelCode = 71
# 模型名称
modelName=ResNet50_TensorFlow2
# 模型描述
......
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