Skip to content

Commit

Permalink
Merge pull request #119 from zhang-haojie/main
Browse files Browse the repository at this point in the history
Update pytorch lightning training
  • Loading branch information
maxin-cn authored Sep 3, 2024
2 parents 1b74d1e + e7f9415 commit 586a76d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion train_pl.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self, args, logger: logging.Logger):
requires_grad(self.ema, False)

# Load pretrained model if specified
if args.pretrained and args.resume_from_checkpoint is not None:
if args.pretrained:
# Load old checkpoint, only load EMA
self._load_pretrained_parameters(args)
self.logging.info(f"Model Parameters: {sum(p.numel() for p in self.model.parameters()):,}")
Expand Down
2 changes: 1 addition & 1 deletion train_with_img_pl.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self, args, logger: logging.Logger):
requires_grad(self.ema, False)

# Load pretrained model if specified
if args.pretrained and args.resume_from_checkpoint is not None:
if args.pretrained:
# Load old checkpoint, only load EMA
self._load_pretrained_parameters(args)
self.logging.info(f"Model Parameters: {sum(p.numel() for p in self.model.parameters()):,}")
Expand Down

0 comments on commit 586a76d

Please sign in to comment.