---
title: 脚本执行
description: "准备数据集并上传到运行环境的目录下，例如：/home/data/resnet50/imagenet。"
url: https://www.hiascend.com/document/detail/zh/TensorFlowCommercial/latest/migration/tfmigr1/tfmigr1_000107.html
sourcePath: /source/zh/TensorFlowCommercial/900/migration/tfmigr1/tfmigr1_000107.html
indexId: 713b393de337b5e87278e02c4f9404a693efecff80222e72b1ddfdde7608486473
---
# 脚本执行

#### 准备数据集

准备数据集并上传到运行环境的目录下，例如：/home/data/resnet50/imagenet。


#### 准备rank table文件

rank table文件样例和文件说明请参考《HCCL集合通信库(https://www.hiascend.com/document/detail/zh/canncommercial/900/API/hcclug/hcclug_000001.html)》的“相关参考 > 集群信息配置”章节。


#### 配置环境变量

请参考执行单Device训练配置环境变量。


#### 执行命令

python3 /home/official/r1/resnet/imagenet_main.py --batch_size=32 --hooks=ExamplesPerSecondHook --data_dir=/home/data/resnet50/imagenet
