Skip to content

Commit

Permalink
Enable swa if start_swa was given
Browse files Browse the repository at this point in the history
  • Loading branch information
vue1999 committed Nov 14, 2024
1 parent 35c7de6 commit 03137c2
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(
(
f"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 03137c2

Please sign in to comment.