| 322 | # This class exists solely for Transformer; it has an annotation stating |
| 323 | # that bias is never None, which appeases TorchScript |
| 324 | class _LinearWithBias(nn.Linear): |
| 325 | bias: Tensor # type: ignore |
| 326 | |
| 327 | def __init__(self, in_features: int, out_features: int) -> None: |
| 328 | super().__init__(in_features, out_features, bias=True) # type: ignore |
| 329 | |
| 330 | |
| 331 | class MultiheadAttention(nn.Module): |