| from transformers.models.bert.configuration_bert import BertConfig | |
| class BertHashConfig(BertConfig): | |
| """ | |
| Extension of Bert configuration to add projections parameter. | |
| """ | |
| model_type = "bert_hash" | |
| def __init__(self, projections=5, **kwargs): | |
| super().__init__(**kwargs) | |
| self.projections = projections | |