Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inigo dev #118

Merged
merged 16 commits into from
May 30, 2024
6 changes: 3 additions & 3 deletions docs/guides/finetuning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ These files are called checkpoints (like video game save files - computer scient
model = finetune.FinetuneableZoobotClassifier(
name='hf_hub:mwalmsley/zoobot-encoder-convnext_nano', # which pretrained model to download
num_classes=2,
n_layers=0
n_blocks=0
)

You can see the list of pretrained models at :doc:`/pretrained_models`.

What about the other arguments?
When loading the checkpoint, FinetuneableZoobotClassifier will automatically change the head layer to suit a classification problem (hence, ``Classifier``).
``num_classes=2`` specifies how many classes we have, Here, two classes (a.k.a. binary classification).
``n_layers=0`` specifies how many layers (other than the output layer) we want to finetune.
0 indicates no other layers, so we will only be changing the weights of the output layer.
``n_blocks=0`` specifies how many inner blocks (groups of layers, excluding the output layer) we want to finetune.
0 indicates no other blocks, so we will only be changing the weights of the output layer.


Prepare Galaxy Data
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@
'albumentations',
'pyro-ppl>=1.8.0',
'torchmetrics==0.11.0',
'timm >= 0.9.10',
'galaxy_datasets == 0.0.17'
'timm >= 0.9.10'
],
# TODO may add narval/Digital Research Canada config
'tensorflow': [ # WARNING now deprecated
Expand Down Expand Up @@ -117,6 +116,6 @@
'webdataset', # for reading webdataset files
'huggingface_hub', # login may be required
'setuptools', # no longer pinned
'galaxy-datasets>=0.0.18' # for dataset loading in both TF and Torch (see github/mwalmsley/galaxy-datasets)
'galaxy-datasets>=0.0.21' # for dataset loading in both TF and Torch (see github/mwalmsley/galaxy-datasets)
]
)
Loading
Loading