(self, cfg: Config, *, parent: Optional[Module])
| 217 | output: Linear.Config = Linear.default_config() # Output projection layer. |
| 218 | |
| 219 | def __init__(self, cfg: Config, *, parent: Optional[Module]): |
| 220 | super().__init__(cfg, parent=parent) |
| 221 | cfg = self.config |
| 222 | self._add_child("pooler", cfg.pooler.set(input_dim=cfg.input_dim)) |
| 223 | self._add_child( |
| 224 | "output", |
| 225 | cfg.output.set(input_dim=cfg.input_dim, output_dim=cfg.num_classes), |
| 226 | ) |
| 227 | |
| 228 | def forward(self, input_batch: NestedTensor) -> Tensor: |
| 229 | """Produces prediction scores from BERT output features. |
nothing calls this directly
no test coverage detected