Skip to content

Commit

Permalink
Update pytorch lightning training
Browse files Browse the repository at this point in the history
  • Loading branch information
zhang-haojie committed Sep 3, 2024
1 parent 1b74d1e commit e7f9415
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 e7f9415

Please sign in to comment.