(self, config, weights, biases)
| 355 | class BertOutput(nn.Module): |
| 356 | |
| 357 | def __init__(self, config, weights, biases): |
| 358 | super(BertOutput, self).__init__() |
| 359 | self.dense = nn.Linear(config.intermediate_size, config.hidden_size) |
| 360 | self.dense.weight = weights[6] |
| 361 | self.dense.bias = biases[6] |
| 362 | self.LayerNorm = BertLayerNorm(config.hidden_size, eps=1e-12) |
| 363 | self.dropout = nn.Dropout(config.hidden_dropout_prob) |
| 364 | |
| 365 | def forward(self, hidden_states, input_tensor): |
| 366 | hidden_states = self.dense(hidden_states) |