matchzoo.modules.bert_module
¶
Bert module.
Module Contents¶
Classes¶
Bert module. |
-
class
matchzoo.modules.bert_module.
BertModule
(mode: str = 'bert-base-uncased')¶ Bases:
torch.nn.Module
Bert module.
BERT (from Google) released with the paper BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding by Jacob Devlin, Ming-Wei Chang, Kenton Lee and Kristina Toutanova.
- Parameters
mode – String, supported mode can be referred https://huggingface.co/pytorch-transformers/pretrained_models.html.
-
forward
(self, x, y)¶ Forward.