Skip to content

Commit

Permalink
Set default patience to 0 and move default data save dir (#71) (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
KSGulin authored Jun 22, 2022
1 parent 0932f04 commit 50837f7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ def parse_opt(known=False):
parser.add_argument('--quad', action='store_true', help='quad dataloader')
parser.add_argument('--cos-lr', action='store_true', help='cosine LR scheduler')
parser.add_argument('--label-smoothing', type=float, default=0.0, help='Label smoothing epsilon')
parser.add_argument('--patience', type=int, default=100, help='EarlyStopping patience (epochs without improvement)')
parser.add_argument('--patience', type=int, default=0, help='EarlyStopping patience (epochs without improvement)')
parser.add_argument('--freeze', nargs='+', type=int, default=[0], help='Freeze layers: backbone=10, first3=0 1 2')
parser.add_argument('--save-period', type=int, default=-1, help='Save checkpoint every x epochs (disabled if < 1)')
parser.add_argument('--local_rank', type=int, default=-1, help='DDP parameter, do not modify')
Expand Down
2 changes: 0 additions & 2 deletions utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,6 @@ def check_dataset(data, autodownload=True):

# Resolve paths
path = Path(extract_dir or data.get('path') or '') # optional 'path' default to '.'
if not path.is_absolute():
path = (ROOT / path).resolve()
for k in 'train', 'val', 'test':
if data.get(k): # prepend path
data[k] = str(path / data[k]) if isinstance(data[k], str) else [str(path / x) for x in data[k]]
Expand Down

0 comments on commit 50837f7

Please sign in to comment.