(self, config, weights, biases)
| 471 | class BertEncoder(nn.Module): |
| 472 | |
| 473 | def __init__(self, config, weights, biases): |
| 474 | super(BertEncoder, self).__init__() |
| 475 | #layer = BertLayer(config, weights, biases) |
| 476 | self.FinalLayerNorm = BertLayerNorm(config.hidden_size, eps=1e-12) |
| 477 | |
| 478 | self.layer = nn.ModuleList( |
| 479 | [copy.deepcopy(BertLayer(i, config, weights, biases)) for i in range(config.num_hidden_layers)]) |
| 480 | self.grads = [] |
| 481 | self.graph = [] |
| 482 | |
| 483 | def get_grads(self): |
| 484 | return self.grads |
nothing calls this directly
no test coverage detected