<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Activation on davethehuman.com</title><link>https://davethehuman.com/tags/activation/</link><description>Recent content in Activation on davethehuman.com</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© 2026 Dave the human</copyright><lastBuildDate>Mon, 28 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://davethehuman.com/tags/activation/index.xml" rel="self" type="application/rss+xml"/><item><title>leaky ReLU</title><link>https://davethehuman.com/notes/leaky-relu/</link><pubDate>Mon, 28 Sep 2026 00:00:00 +0000</pubDate><guid>https://davethehuman.com/notes/leaky-relu/</guid><description>&lt;p&gt;&lt;em&gt;LeakyReLU&lt;/em&gt; is a variation of the &lt;a href="https://davethehuman.com/notes/relu/"&gt;ReLU&lt;/a&gt; &lt;a href="https://davethehuman.com/notes/activation-function/"&gt;activation function&lt;/a&gt;:&lt;/p&gt;
$$
f(x) = \max(\alpha x, x)
$$&lt;p&gt;&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt="Human evolution illustration"
 src="attachments/leaky-ReLU.png"
 &gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;It leaves positive inputs unvaried while multiplying the negative ones by a small positive constant $\alpha$.
Unlike ReLU, which outputs zero for any negative input, Leaky ReLU keeps a small slope on the negative side, allowing &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;gradients&lt;/a&gt; to flow through &lt;a href="https://davethehuman.com/notes/neuron/"&gt;neurons&lt;/a&gt; with negative inputs during &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;backpropagation&lt;/a&gt;, and mitigating the &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;dying ReLU&lt;/a&gt; problem.&lt;/p&gt;
&lt;p&gt;In standard Leaky ReLU, $\alpha$ is a fixed &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;hyperparameter&lt;/a&gt;, while in [PReLU] it is learned during training.&lt;/p&gt;</description></item><item><title>ReLU</title><link>https://davethehuman.com/notes/relu/</link><pubDate>Tue, 22 Sep 2026 00:00:00 +0000</pubDate><guid>https://davethehuman.com/notes/relu/</guid><description>&lt;p&gt;&lt;em&gt;ReLU (Rectified Linear Unit)&lt;/em&gt; is an &lt;a href="https://davethehuman.com/notes/activation-function/"&gt;activation function&lt;/a&gt; with formula:&lt;/p&gt;
$$
f(x) = \max(0, x)
$$&lt;p&gt;&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="auto"
 alt="Human evolution illustration"
 width="1600"
 height="1100"
 src="https://davethehuman.com/attachments/ReLU_hu_28a8d9f66b312ef8.png"
 srcset="https://davethehuman.com/attachments/ReLU_hu_28a8d9f66b312ef8.png 800w, https://davethehuman.com/attachments/ReLU_hu_c3bc7cbf58118f9b.png 1280w"
 sizes="(min-width: 768px) 50vw, 65vw"
 data-zoom-src="https://davethehuman.com/attachments/ReLU.png"&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;It is the &lt;strong&gt;default activation function in the &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;hidden layers&lt;/a&gt;&lt;/strong&gt; of modern &lt;a href="https://davethehuman.com/notes/neural-network/"&gt;neural networks&lt;/a&gt;s (&lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;FNN&lt;/a&gt;, &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;CNN&lt;/a&gt;, etc.) and it just checks if a number is larger than zero, allowing for quick computation and fast &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;convergence&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Pros:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;it tackles the &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;vanishing gradient problem&lt;/a&gt;, keeping the &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;gradient&lt;/a&gt; flow strong during &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;backpropagation&lt;/a&gt; - this happens because its derivative (gradient) for any positive input is always &lt;strong&gt;exactly 1&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;it allows sparse activation, meaning that only relevant &lt;a href="https://davethehuman.com/notes/neuron/"&gt;neuron&lt;/a&gt;s fire, while negative inputs are zeroed out&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Cons:&lt;/p&gt;</description></item></channel></rss>