(self, config)
| 460 | |
| 461 | class BertEncoder(nn.Module): |
| 462 | def __init__(self, config): |
| 463 | super().__init__() |
| 464 | self.config = config |
| 465 | self.layer = nn.ModuleList([BertLayer(config,i) for i in range(config.num_hidden_layers)]) |
| 466 | self.gradient_checkpointing = False |
| 467 | |
| 468 | def forward( |
| 469 | self, |