瀏覽代碼

Add train.py `--name cfg` option (#7202)

Automatically names run as --cfg argument
modifyDataloader
Glenn Jocher GitHub 2 年之前
父節點
當前提交
df9008ee69
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 2 行新增0 行删除
  1. +2
    -0
      train.py

+ 2
- 0
train.py 查看文件

@@ -519,6 +519,8 @@ def main(opt, callbacks=Callbacks()):
if opt.project == str(ROOT / 'runs/train'): # if default project name, rename to runs/evolve
opt.project = str(ROOT / 'runs/evolve')
opt.exist_ok, opt.resume = opt.resume, False # pass resume to exist_ok and disable resume
if opt.name == 'cfg':
opt.name = Path(opt.cfg).stem # use model.yaml as name
opt.save_dir = str(increment_path(Path(opt.project) / opt.name, exist_ok=opt.exist_ok))

# DDP mode

Loading…
取消
儲存