{"id":409,"date":"2026-09-05T21:30:36","date_gmt":"2026-09-06T00:30:36","guid":{"rendered":"https:\/\/www.linuxpro.com.br\/2026\/09\/o-que-e-uma-rede-neural\/"},"modified":"2026-09-08T05:23:38","modified_gmt":"2026-09-08T08:23:38","slug":"o-que-e-uma-rede-neural","status":"publish","type":"post","link":"https:\/\/www.linuxpro.com.br\/en\/2026\/09\/o-que-e-uma-rede-neural\/","title":{"rendered":"What is a neural network?"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" alt=\"Mascote do LinuxPro conectando nos da rede neural\" src=\"\/wp-content\/uploads\/2026\/09\/rede-neural-v3.webp\" width=\"1052\" height=\"652\" \/><\/p>\n<p>Recognizing a <strong>3<\/strong> scribbled in 28\u00d728 pixels is instant for you. Writing an <code data-no-translation=\"\">if\/else<\/code> that does the same \u2014 a curve here, a stem there, and what if it is crooked? \u2014 is a nightmare. The neural network in the video <a href=\"https:\/\/www.youtube.com\/watch?v=aircAruvnKk\">But what is a neural network?<\/a>, by <strong>3Blue1Brown<\/strong> (Grant Sanderson), breaks it down: it is not magic, it is a function with thousands of knobs.<\/p>\n<p><!-- more --><\/p>\n<div style=\"position:relative;padding-bottom:56.25%;height:0;overflow:hidden;margin:1.5em 0\">\n<iframe src=\"https:\/\/www.youtube.com\/embed\/aircAruvnKk\" title=\"But what is a neural network? | Deep learning chapter 1 \u2014 3Blue1Brown\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen style=\"position:absolute;top:0;left:0;width:100%;height:100%;border:0\"><\/iframe>\n<\/div>\n<p>This text follows chapter 1 of the deep learning series. The calculation the GPU performs in <a href=\"\/en\/2026\/09\/gpu-vs-tpu-como-funcionam-chips-ia\/\">GPU vs TPU post<\/a> is exactly this: multiplying matrices, a million times.<\/p>\n<h2>A neuron is a number<\/h2>\n<p class=\"translation-block\">Forget the biological diagram. In silicon, a neuron is a <strong>container holding a number<\/strong> \u2014 its <em>activation<\/em>. In MNIST (handwritten digits):<\/p>\n<ul>\n<li><strong>Input:<\/strong> 28\u00d728 = <strong>784<\/strong> neurons. Each stores a pixel's brightness, from 0 (black) to 1 (white).<\/li>\n<li><strong>Output:<\/strong> <strong>10<\/strong> neurons, one for each digit 0\u20139. The highest value is the prediction.<\/li>\n<li><strong>Hidden:<\/strong> in the video's example, two layers of 16. The network becomes <code data-no-translation=\"\">784 \u2192 16 \u2192 16 \u2192 10<\/code>.<\/li>\n<\/ul>\n<pre data-no-translation=\"\"><code class=\"language-text\" data-no-translation=\"\">entrada 784 px   \u2192   oculta 16   \u2192   oculta 16   \u2192   sa\u00edda 10\n  (pixels)            (bordas)         (formas)        (0..9)\n<\/code><\/pre>\n<h2>Why layers<\/h2>\n<p>A pixel alone means nothing. The network stacks abstractions:<\/p>\n<ul>\n<li>Layer 2: edge fragments (short stroke, diagonal).<\/li>\n<li>Layer 3: joins edges \u2014 circle on top + stem = <strong>9<\/strong>; two circles = <strong>8<\/strong>; three straight lines = <strong>4<\/strong>.<\/li>\n<li>Layer 4: combines the pieces and chooses the digit.<\/li>\n<\/ul>\n<p>The same scheme in audio: sample \u2192 phoneme \u2192 syllable \u2192 word. That is why \u201cdeep\u201d: depth is hierarchy, not marketing.<\/p>\n<h2>Weights, bias, and activation<\/h2>\n<p class=\"translation-block\">Each edge between neurons has a <strong>weight<\/strong> <code>w<\/code>. Positive values stimulate; negative values inhibit (light in that region? Then this is <em>not<\/em> the pattern). Zero ignores the pixel.<\/p>\n<p>The stimulus reaching neuron <code data-no-translation=\"\">j<\/code> is the weighted sum of previous activations, plus a <strong>bias<\/strong> <code data-no-translation=\"\">b<\/code> (the threshold: with <code data-no-translation=\"\">b = -10<\/code>, the sum must exceed +10 for the neuron to \u201clight up\u201d):<\/p>\n<pre data-no-translation=\"\"><code class=\"language-text\" data-no-translation=\"\">est\u00edmulo = (w1\u00b7a1 + w2\u00b7a2 + \u2026 + wn\u00b7an) + b\n<\/code><\/pre>\n<p>This number can be any real number. The <strong>activation function<\/strong> squeezes it into a useful range. The video uses the <strong>sigmoid<\/strong> (logistic curve), the classic analogy with biological firing:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-text\" data-no-translation=\"\">\u03c3(x) = 1 \/ (1 + e^(-x))\n  x \u2192 -\u221e  \u21d2  0\n  x = 0     \u21d2  0,5\n  x \u2192 +\u221e  \u21d2  1\n<\/code><\/pre>\n<p>In practice, deep networks abandoned the sigmoid along the way: it saturates and the gradient disappears (<em>vanishing gradient<\/em>). The standard became <strong>ReLU<\/strong> \u2014 cheap and sufficiently nonlinear:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-text\" data-no-translation=\"\">ReLU(x) = max(0, x)\n<\/code><\/pre>\n<h2>13.002 knobs<\/h2>\n<p>How many free numbers are in this teaching network?<\/p>\n<table>\n<thead>\n<tr>\n<th>Layers<\/th>\n<th>Weights<\/th>\n<th>Biases<\/th>\n<th>Total<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>784 \u2192 16<\/td>\n<td>12.544<\/td>\n<td>16<\/td>\n<td>12.560<\/td>\n<\/tr>\n<tr>\n<td>16 \u2192 16<\/td>\n<td>256<\/td>\n<td>16<\/td>\n<td>272<\/td>\n<\/tr>\n<tr>\n<td>16 \u2192 10<\/td>\n<td>160<\/td>\n<td>10<\/td>\n<td>170<\/td>\n<\/tr>\n<tr>\n<td><strong>Sum<\/strong><\/td>\n<td><strong>12.960<\/strong><\/td>\n<td><strong>42<\/strong><\/td>\n<td><strong>13.002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Training means finding those 13 thousand numbers. Gradient descent + backpropagation \u2014 the next video in the series. A 2026 LLM has <em>billions<\/em> of the same knobs; the calculation does not change, only the scale. That is why a model in <a href=\"\/en\/2026\/09\/rodando-ia-local-no-linux-com-ollama\/\">Ollama<\/a> consumes RAM: each parameter is a <code data-no-translation=\"\">float<\/code> that needs to fit in memory.<\/p>\n<h2>One line of linear algebra<\/h2>\n<p class=\"translation-block\">Working neuron by neuron does not scale. Stack the activations in vector <code>a<\/code>, the weights in matrix <code>W<\/code>, and the biases in vector <code>b<\/code>. The entire layer becomes:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-text\" data-no-translation=\"\">a\u00b9 = \u03c3( W \u00b7 a\u2070 + b )\n<\/code><\/pre>\n<p>Matrix-vector product, add the bias, apply \u03c3 at each position. NumPy, PyTorch, and TensorFlow exist to do this quickly \u2014 BLAS\/GEMM on the GPU. The data center's \u201cAI\u201d is fundamentally this line repeated.<\/p>\n<h2>So what is a neural network?<\/h2>\n<p class=\"translation-block\">A function <code>f<\/code>. In MNIST: the input is \u211d<sup>784<\/sup>, the output is \u211d<sup>10<\/sup>, with 13.002 parameters inside in matrix products with nonlinearity in between. With enough data, this function learns patterns nobody would write by hand. The rest \u2014 Transformer, attention, GPU \u2014 is a variation on the same trick.<\/p>\n<h2>References<\/h2>\n<ul>\n<li>Video: <a href=\"https:\/\/www.youtube.com\/watch?v=aircAruvnKk\">3Blue1Brown \u2014 But what is a neural network?<\/a> (Grant Sanderson)<\/li>\n<li>Series: <a href=\"https:\/\/www.3blue1brown.com\/topics\/neural-networks\">Neural networks \u00b7 3blue1brown.com<\/a><\/li>\n<li><a href=\"\/en\/2026\/09\/gpu-vs-tpu-como-funcionam-chips-ia\/\">GPU vs TPU: how AI chips work<\/a><\/li>\n<li><a href=\"\/en\/2026\/09\/rodando-ia-local-no-linux-com-ollama\/\">Running local AI on Linux with Ollama<\/a><\/li>\n<\/ul>\n<p>Thirteen thousand numbers to read a digit. Trillions to converse. The machine is the same.<\/p>","protected":false},"excerpt":{"rendered":"<p>Recognizing a scribbled 3 in 28\u00d728 pixels is instant for you. Writing an if\/else that does the same \u2014 a curve here, a stroke there, and what if it is crooked? \u2014 is a nightmare. The neural network in But what is a neural network? from 3Blue1Brown (Grant Sanderson) breaks it down: it is not magic, but a function with \u2026 <a title=\"What is a neural network?\" class=\"read-more\" href=\"https:\/\/www.linuxpro.com.br\/en\/2026\/09\/o-que-e-uma-rede-neural\/\" aria-label=\"Read more about O que \u00e9 uma rede neural?\">Read more<\/a><\/p>","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[115,2],"tags":[162,161,116,163,160],"class_list":["post-409","post","type-post","status-publish","format-standard","hentry","category-ia","category-linux","tag-3blue1brown","tag-deep-learning","tag-ia","tag-mnist","tag-redes-neurais"],"_links":{"self":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/comments?post=409"}],"version-history":[{"count":4,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/409\/revisions"}],"predecessor-version":[{"id":1134,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/409\/revisions\/1134"}],"wp:attachment":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/media?parent=409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/categories?post=409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/tags?post=409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}