Mindspore's fast gelu implementation.
(x)
| 5 | |
| 6 | |
| 7 | def fast_gelu(x): |
| 8 | """Mindspore's fast gelu implementation.""" |
| 9 | return x / (1 + torch.exp(-1.702 * torch.abs(x))) * torch.exp(0.851 * (x - torch.abs(x))) |
| 10 | |
| 11 | |
| 12 | class MLP(torch.nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected