Gaussian Error Linear Units (GELUs)
Abstract
We propose the Gaussian Error Linear Unit (GELU), a high-performing neural network activation function. The GELU activation function is $x\Phi(x)$, where $\Phi(x)$ the standard Gaussian cumulative distribution function. The GELU nonlinearity weights inputs by their value, rather than gates inputs by their sign as in ReLUs ($x\mathbf{1}_{x>0}$). We perform an empirical evaluation of the GELU nonlinearity against the ReLU and ELU activations and find performance improvements across all considered computer vision, natural language processing, and speech tasks.
Code References
pytorch/pytorch
2 files
torch/nn/functional.py
2
torch/nn/modules/activation.py
1
L442
See `Gaussian Error Linear Units (GELUs) <https://arxiv.org/abs/1606.08415>`_
tensorflow/tensorflow
3 files
tensorflow/python/keras/activations.py
1
L342
- [Gaussian Error Linear Units (GELUs)](https://arxiv.org/abs/1606.08415)
tensorflow/python/ops/nn_impl.py
1
L440
(GELUs)" [Hendrycks et al. 2016](https://arxiv.org/abs/1606.08415) and
tensorflow/python/ops/nn_ops.py
1
L3738
[Gaussian Error Linear Units (GELUs)](https://arxiv.org/abs/1606.08415).
Link copied to clipboard!