Skip to content
This repository was archived by the owner on Mar 14, 2024. It is now read-only.
This repository was archived by the owner on Mar 14, 2024. It is now read-only.

[Question] Is it possible to "freeze" embeddings of a certain entity type? #270

@FrankPortman

Description

@FrankPortman

Thank you for making this library! I'm a big fan.

When training or finetuning Embedding tables it can be common to freeze all or part of it: https://pytorch.org/docs/stable/generated/torch.nn.Embedding.html#torch.nn.Embedding

I'm wondering if that is possible to do in PyTorch-BigGraph out of the box? E.G. If I have 3 entity types (Users, Tweets, Communities) but the Tweet nodes come with some pre-trained embeddings, and then I want to "freeze" or not update the Tweet node embeddings. As an aside, it seems like warm starting some set of nodes with a pre-trained embedding is not first-class supported but is mockable by manually generating a first checkpoint file.

Reading through some code and documentation suggests "no, you can't freeze some entity embedding table". I would appreciate if somebody can confirm this, and also give me some pointers on what I'd have to fiddle with to fork and add this functionality (happy to submit as a well documented PR as well, if there is interest from maintainers).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions