From b84ebc0a0449bee664de08d446c918e992b1c7fb Mon Sep 17 00:00:00 2001 From: TFUsers <25044281+TFUsers@users.noreply.github.com> Date: Mon, 9 Nov 2020 08:46:14 -0800 Subject: [PATCH] Add SiLU (#19497) * add silu activation * Update activations.md * add activation images * update activation docs * add silu test * add silu test --- .../python_docs/python/api/gluon/nn/index.rst | 2 ++ .../gluon/blocks/activations/activations.md | 34 +++++++++++++----- .../gluon/blocks/activations/images/gelu.png | Bin 0 -> 10289 bytes .../gluon/blocks/activations/images/silu.png | Bin 0 -> 10155 bytes python/mxnet/gluon/nn/activations.py | 33 +++++++++++++++-- tests/python/unittest/test_gluon.py | 7 ++++ tests/python/unittest/test_numpy_gluon.py | 7 ++++ 7 files changed, 72 insertions(+), 11 deletions(-) create mode 100644 docs/python_docs/python/tutorials/packages/gluon/blocks/activations/images/gelu.png create mode 100644 docs/python_docs/python/tutorials/packages/gluon/blocks/activations/images/silu.png diff --git a/docs/python_docs/python/api/gluon/nn/index.rst b/docs/python_docs/python/api/gluon/nn/index.rst index 009464724ba0..7aeacd87cc06 100644 --- a/docs/python_docs/python/api/gluon/nn/index.rst +++ b/docs/python_docs/python/api/gluon/nn/index.rst @@ -147,6 +147,8 @@ Advanced Activation Layers nn.ELU nn.SELU nn.Swish + nn.SiLU + nn.GELU API Reference ------------- diff --git a/docs/python_docs/python/tutorials/packages/gluon/blocks/activations/activations.md b/docs/python_docs/python/tutorials/packages/gluon/blocks/activations/activations.md index e5ba40353a9f..13a4830b55fa 100644 --- a/docs/python_docs/python/tutorials/packages/gluon/blocks/activations/activations.md +++ b/docs/python_docs/python/tutorials/packages/gluon/blocks/activations/activations.md @@ -19,7 +19,7 @@ Deep neural networks are a way to express a nonlinear function with lots of parameters from input data to outputs. The nonlinearities that allow neural networks to capture complex patterns in data are referred to as activation functions. Over the course of the development of neural networks, several nonlinear activation functions have been introduced to make gradient-based deep learning tractable. -If you are looking to answer the question, 'which activation function should I use for my neural network model?', you should probably go with *ReLU*. Unless you're trying to implement something like a gating mechanism, like in LSTMs or GRU cells, then you should opt for sigmoid and/or tanh in those cells. However, if you have a working model architecture and you're trying to improve its performance by swapping out activation functions or treating the activation function as a hyperparameter, then you may want to try hand-designed activations like SELU or a function discovered by reinforcement learning and exhaustive search like Swish. This guide describes these activation functions and others implemented in MXNet in detail. +If you are looking to answer the question, 'which activation function should I use for my neural network model?', you should probably go with *ReLU*. Unless you're trying to implement something like a gating mechanism, like in LSTMs or GRU cells, then you should opt for sigmoid and/or tanh in those cells. However, if you have a working model architecture and you're trying to improve its performance by swapping out activation functions or treating the activation function as a hyperparameter, then you may want to try hand-designed activations like SELU, SiLU, or GELU. This guide describes these activation functions and others implemented in MXNet in detail. ## Visualizing Activations In order to compare the various activation functions and to understand the nuances of their differences we have a snippet of code to plot the activation functions (used in the forward pass) and their gradients (used in the backward pass). @@ -237,24 +237,40 @@ visualize_activation(mx.gluon.nn.SELU()) ![selu activation and gradient](images/selu.png) -### Swish -Swish is an activation function that attempts to address the shortcomings of ReLU by combining ideas from ReLU and sigmoid. Swish was discovered by searching the space of activation functions using a combination of exhaustive and reinforcement learning-based search and was introduced in the paper by [Ramchandran et al](https://arxiv.org/pdf/1710.05941.pdf). +### SiLU +The SiLU is an activation function that attempts to address the shortcomings of ReLU by combining ideas from ReLU and sigmoid. The SiLU serves as a smooth approximation to the ReLU and was originally introduced in [Hendrycks et al](https://arxiv.org/abs/1606.08415). -The swish function is given as +The silu function is given as -$$ swish(x) = x\cdot\sigma(\beta x)$$ +$$ silu(x) = x\cdot\sigma(x)$$ -where $\sigma$ is the sigmoid activation function $\sigma(x) = \frac{1}{1 + e^{-x}}$ described above and $\beta$ is a hyperparameter set to 1 by default in MXNet. +where $\sigma$ is the sigmoid activation function $\sigma(x) = \frac{1}{1 + e^{-x}}$ described above. ```{.python .input} -visualize_activation(mx.gluon.nn.Swish()) +visualize_activation(mx.gluon.nn.SiLU()) ``` -![swish activation and gradient](images/swish.png) +![silu activation and gradient](images/silu.png) +### GELU +The GELU is a smooth approximation to the ReLU and was introduced in [Hendrycks et al](https://arxiv.org/abs/1606.08415). It is a common activation function in architectures such as Transformers, BERT, and GPT. +The gelu function is given as + +$$ gelu(x) = x\cdot\Phi(x),$$ + +whereas the ReLU can be written as $x\cdot\mathbf{1}(x>0)$, so $Phi(x)$ serves as a smooth approximation to the ReLU's indicator function. + +Note $\Phi(x) = \frac{1}{\sqrt{2 \pi}} \exp\left\{-\frac{x^2}{2}\right\}$ is the standard normal cumulative distribution. + + +```{.python .input} +visualize_activation(mx.gluon.nn.GELU()) +``` + +![gelu activation and gradient](images/gelu.png) ## Summary @@ -263,7 +279,7 @@ visualize_activation(mx.gluon.nn.Swish()) * Sigmoids like the logistic (sigmoid) function and tanh where the first kinds of activation functions used in neural networks. They have since fallen out of use because of their tendency to saturate and have vanishing gradients. * Rectifiers like ReLU do not saturate like the Sigmoids and so address the vanishing gradient problem making them the de facto activation functions. ReLU however is still plagued by the dying ReLU problem. * LeakyReLU and PReLU are two similar approaches to improve ReLU and address the dying ReLU by introducing a parameter $\alpha$ (learned in PReLU) that leaks to the gradient of negative inputs -* MXNet also implements custom state-of-the-art activations like ELU, SELU and Swish. +* MXNet also implements custom state-of-the-art activations like ELU, SELU, SiLU, and GELU. diff --git a/docs/python_docs/python/tutorials/packages/gluon/blocks/activations/images/gelu.png b/docs/python_docs/python/tutorials/packages/gluon/blocks/activations/images/gelu.png new file mode 100644 index 0000000000000000000000000000000000000000..26a2588e223207094e4d5e4d5c4bdad8a7cf720e GIT binary patch literal 10289 zcmZX)byQVfv<3=-grrCbQo@gJkPbnlLqNJ4=}svLX^?J^?(XjHZV)(h*P(ffd+&Jf zkH;9mIs5Fh_FQw#_~!g(&^K8zv^NBAU|?X-B*aA&U|?V=!0Q$y1n`$&2WATVgSQu! z_>KgAej*tLg7?Ta;%fFVFeq3rzp#@lo)6$6m%~?82SsaR2WLGyBN$6P2OA4(2a6y2 zq)tY5_CKtx*ce$DndwPQ9UN?Un3(>*&l#=l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fQ1EzgeaA1w@mNP6j^HbVF*5a z%aJ$|#SsS+B`Ux|3&BhVt$=`bPF~(p@d-G%f{YAOoVRcPe*E~+qVcyJO->w>PU$N+ zxY(?$taB(-1#pSA5^dmHN@QeYg_cXT`>`t86%y%qp~U>^ui@dTTeQo-?K6EOUKUlY zUQf3suk!&xqx>`sNM-Y?C+Oiq7UHjQ7Dve3ca`71sUr{{X7nl?4C* literal 0 HcmV?d00001 diff --git a/docs/python_docs/python/tutorials/packages/gluon/blocks/activations/images/silu.png b/docs/python_docs/python/tutorials/packages/gluon/blocks/activations/images/silu.png new file mode 100644 index 0000000000000000000000000000000000000000..6060fdde3c2485a857eab1ced937ad6ba4dfe440 GIT binary patch literal 10155 zcmYLP1yoi+w*^r^xFx&U?nX+wkp}6K?rv!i>F$#5&JW-4{(rsaTFA%! z?wvbx=FC3l?0v!%!FZi1G3RJ-OoZ1TJzpi)uJ4+nGAM8916i*%&z6TiZEXTNu7~HF0#Z zu(M@lU}j*VdvEUSY|q2U`2XKC*g2Xp)*px9LP5QUlKd>B;+}rI;^wY0GkbS_O3rGL z4=rh)6NE2}ASpqn1cCO?_Ahc4{fzc`{86h3CtPoQID%}@yHBTASp6K~RW~;DoBUt} zVP^Q(apOu7cFLotF)%qn-vcek4=?#VM(dnrf5>PY)ta4pvxVnUt0);8lRw^`Rvy_3 z!z(g`5S-#giSan^efswdu}O?U%Y|(%em|1N8T0GcC+%&rz@iN)L?tOHgu}T?vp*@! z4S&Sp6$30PSKPM~)l>Mtax^zLn{+U7a3syoYd}p-PTGFetDK9EixXBcWNX%%<`))f)6JG?*4nnL6)P8hB%-3B3ELh{ zPF`K>^c9S!lx-T&RFEFBm|tuMQJp6LjxGoK(^thX{t)M&)X7ks|U zlNxBQe=jN~#^U?@^!2waytMQv-FkruocW1zL`)`1UsukB?(3PK@3(h%rz-UYg+)Xx z);jo0)yiK@BPmwnXh$t??bqqc9^^$u9l+jr{o3EiHKxFP>A*xYN?VLbYHz^ zWQ^I({2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