Skip to content

Commit

Permalink
Merge pull request #697 from vue1999/swa-check
Browse files Browse the repository at this point in the history
Enable swa if start_swa was given
  • Loading branch information
ilyes319 authored Nov 15, 2024
2 parents eca0bb2 + 2efbd5e commit 3603dcd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mace/tools/arg_parser_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ def check_args(args):

# Loss and optimization
# Check Stage Two loss start
if args.start_swa is not None:
args.swa = True
log_messages.append(
(
"Stage Two is activated as start_stage_two was defined",
logging.INFO,
)
)

if args.swa:
if args.start_swa is None:
args.start_swa = max(1, args.max_num_epochs // 4 * 3)
Expand Down

0 comments on commit 3603dcd

Please sign in to comment.