Skip to content
Snippets Groups Projects
Commit 03f4713e authored by Stephane Chavin's avatar Stephane Chavin
Browse files

Update file train.py

parent 80b157de
No related branches found
No related tags found
No related merge requests found
......@@ -469,7 +469,7 @@ def parse_opt(known=False):
parser.add_argument('--save-period', type=int, default=-1, help='Save checkpoint every x epochs (disabled if < 1)')
parser.add_argument('--seed', type=int, default=0, help='Global training seed')
parser.add_argument('--local_rank', type=int, default=-1, help='Automatic DDP Multi-GPU argument, do not modify')
parser.add_argument('--sr', type=str, default='', help='If sound, give the samplerate of the spectrogram')
parser.add_argument('--rf', type=str, default='', help='If sound, give the samplerate of the spectrogram')
parser.add_argument('--duration', type=str, default='', help='If sound, give the duration of the spectrogram')
# Logger arguments
......@@ -514,7 +514,7 @@ def main(opt, callbacks=Callbacks()):
opt.name = Path(opt.cfg).stem # use model.yaml as name
project_name = input('Please enter the name of your project : ')
date_now = date.today().strftime("%Y%m%d")
folder_name = '_'.join([project_name, date_now, opt.weights[-4:-3], str(opt.imgsz), opt.optimizer, opt.sr, opt.duration, 'YOLOV5',])
folder_name = '_'.join([project_name, date_now, opt.weights[-4:-3], str(opt.imgsz), opt.optimizer, opt.rf, opt.duration, 'YOLOV5',])
print(f'Your train results will be saved in {folder_name}')
opt.save_dir = str(increment_path(Path(opt.project) / folder_name, exist_ok=opt.exist_ok))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment