(self, config, weights, biases)
| 304 | class BertSelfOutput(nn.Module): |
| 305 | |
| 306 | def __init__(self, config, weights, biases): |
| 307 | super(BertSelfOutput, self).__init__() |
| 308 | self.dense = nn.Linear(config.hidden_size, config.hidden_size) |
| 309 | self.dense.weight = weights[3] |
| 310 | self.dense.bias = biases[3] |
| 311 | self.LayerNorm = BertLayerNorm(config.hidden_size, eps=1e-12) |
| 312 | self.dropout = nn.Dropout(config.hidden_dropout_prob) |
| 313 | |
| 314 | def forward(self, hidden_states, input_tensor): |
| 315 | hidden_states = self.dense(hidden_states) |