Skip to content

Commit

Permalink
tiny tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
mwalmsley committed Apr 4, 2024
1 parent dce3ec7 commit e1b43c6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions zoobot/pytorch/training/finetune.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class FinetuneableZoobotAbstract(pl.LightningModule):
prog_bar (bool, optional): Print progress bar during finetuning. Defaults to True.
visualize_images (bool, optional): Upload example images to WandB. Good for debugging but slow. Defaults to False.
seed (int, optional): random seed to use. Defaults to 42.
n_layers: No effect, deprecated. Use n_blocks instead.
"""

def __init__(
Expand Down Expand Up @@ -104,7 +105,8 @@ def __init__(
# debugging utils
prog_bar=True,
visualize_images=False, # upload examples to wandb, good for debugging
seed=42
seed=42,
n_layers=None, # deprecated, no effect
):
super().__init__()

Expand Down Expand Up @@ -380,7 +382,7 @@ def upload_images_to_wandb(self, outputs, batch, batch_idx):

@classmethod
def load_from_name(cls, name: str, **kwargs):
downloaded_loc = download_from_name(cls.__name__, name, **kwargs)
downloaded_loc = download_from_name(cls.__name__, name)
return cls.load_from_checkpoint(downloaded_loc, **kwargs) # trained on GPU, may need map_location='cpu' if you get a device error


Expand Down

0 comments on commit e1b43c6

Please sign in to comment.