(self, dim_in: int, dim_out: int, approximate: str = "none", bias: bool = True)
| 569 | """ |
| 570 | |
| 571 | def __init__(self, dim_in: int, dim_out: int, approximate: str = "none", bias: bool = True): |
| 572 | super().__init__() |
| 573 | self.proj = nn.Linear(dim_in, dim_out, bias=bias) |
| 574 | self.approximate = approximate |
| 575 | |
| 576 | def gelu(self, gate: torch.Tensor) -> torch.Tensor: |
| 577 | return torch.nn.functional.gelu(gate, approximate=self.approximate) |
no outgoing calls
no test coverage detected