更新 'train.py'

This commit is contained in:
liuzx 2022-12-06 10:19:44 +08:00
parent c4473fedc9
commit 9f94bbd1e4
1 changed files with 7 additions and 4 deletions

View File

@ -143,10 +143,13 @@ if __name__ == "__main__":
args, unknown = parser.parse_known_args()
data_dir = '/cache/data'
train_dir = '/cache/output'
try:
if not os.path.exists(data_dir):
os.makedirs(data_dir)
if not os.path.exists(train_dir):
os.makedirs(train_dir)
except Exception as e:
print("path already exists")
###Initialize and copy data to training image
DownloadFromQizhi(args.data_url, data_dir)
###The dataset path is used here:data_dir +"/train"