(self, config)
| 19 | # self.pooler_output = pooler_output |
| 20 | |
| 21 | def __init__(self, config): |
| 22 | RobertaForSequenceClassification.__init__(self, config) |
| 23 | self.embeddingHead = nn.Linear(config.hidden_size, 768) # ANCE has |
| 24 | self.norm = nn.LayerNorm(768) |
| 25 | self.apply(self._init_weights) |
| 26 | self.use_mean = False |
| 27 | |
| 28 | def _init_weights(self, module): |
| 29 | """ Initialize the weights """ |