(self, config)
| 279 | |
| 280 | class BertAttention(nn.Module): |
| 281 | def __init__(self, config): |
| 282 | super().__init__() |
| 283 | self.self = BertSelfAttention(config) |
| 284 | self.output = BertSelfOutput(config) |
| 285 | self.pruned_heads = set() |
| 286 | |
| 287 | def prune_heads(self, heads): |
| 288 | if len(heads) == 0: |
nothing calls this directly
no test coverage detected