Skip to content

Commit

Permalink
valid_train (#3567)
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyutang committed Nov 8, 2023
1 parent 12ca7e3 commit e167b03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions paddleseg/core/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def train(model,
save_dir='output',
iters=10000,
batch_size=2,
early_stop_interval=None,
early_stop_intervals=None,
resume_model=None,
save_interval=1000,
log_iters=10,
Expand Down Expand Up @@ -367,7 +367,7 @@ def train(model,
elif mean_iou < best_mean_iou:
stop_count += 1

if early_stop_interval is not None and stop_count >= early_stop_interval:
if early_stop_intervals is not None and stop_count >= early_stop_intervals:
stop_status = True
logger.info(
'Early stopping at iter {}. The best mean IoU is {:.4f}.'
Expand Down
2 changes: 1 addition & 1 deletion tools/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def main(args):
save_dir=args.save_dir,
iters=cfg.iters,
batch_size=cfg.batch_size,
early_stop=args.early_stop_intervals,
early_stop_intervals=args.early_stop_intervals,
resume_model=args.resume_model,
save_interval=args.save_interval,
log_iters=args.log_iters,
Expand Down

0 comments on commit e167b03

Please sign in to comment.