Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

combining TEXT.build_vocab with BERT Embedding #2282

@muhalfian

Description

@muhalfian

❓ Questions and Help

Description

Hi, we can use glove embedding when building vocab, using
something like:

MIN_FREQ = 2

TEXT.build_vocab(train_data, 
                 min_freq = MIN_FREQ,
                 vectors = "glove.6B.300d",
                 unk_init = torch.Tensor.normal_)

However, I want to use BERT embedding because I need a sophisticated model to compare the performance of multiple embeddings. How can I use BERT in build_vocab?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions