Skip to content

How to use BackboneFinetuning callback? #19711

Open
@Antoine101

Description

@Antoine101

📚 Documentation

Hi lightning team,

I am trying to implement finetuning of a custom model I have pretrained weights of.
It's a transformer architecture with a classification head on it.

I found this callback: https://lightning.ai/docs/pytorch/stable/api/lightning.pytorch.callbacks.BackboneFinetuning.html#lightning.pytorch.callbacks.BackboneFinetuning

But i think this doc is not self sufficient as I don't really know what's expected from my model.
Do I need to have specifically named self.backbone and self.head attributes in my model class for it to work?

A more in-depth example could prove valuable here.

Thanks a lot in advance.

Antoine

cc @Borda

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions