# But what is a neural network? | Deep learning chapter 1

https://www.youtube.com/watch?v=aircAruvnKk
Translation: it

[00:04] This is a 3.
  Questo è un 3.

[00:06] It's sloppily written and rendered at an extremely low resolution of 28x28 pixels, but your brain has no trouble recognizing it as a 3.
  È scritto in modo sciatto e renderizzato a una risoluzione estremamente bassa di 28x28 pixel, ma il tuo cervello non ha problemi a riconoscerlo come un 3.

[00:14] And I want you to take a moment to appreciate how crazy it is that brains can do this so effortlessly.
  E voglio che ti prenda un momento per apprezzare quanto sia pazzesco che i cervelli possano farlo così facilmente.

[00:19] I mean, this, this and this are also recognizable as 3s, even though the specific values of each pixel is very different from one image to the next.
  Voglio dire, questo, questo e questo sono anch'essi riconoscibili come 3, anche se i valori specifici di ogni pixel sono molto diversi da un'immagine all'altra.

[00:28] The particular light-sensitive cells in your eye that are firing when you see this 3 are very different from the ones firing when you see this 3.
  Le particolari cellule fotosensibili nel tuo occhio che si attivano quando vedi questo 3 sono molto diverse da quelle che si attivano quando vedi questo 3.

[00:37] But something in that crazy-smart visual cortex of yours resolves these as representing the same idea, while at the same time recognizing other images as their own distinct ideas.
  Ma qualcosa in quella tua corteccia visiva incredibilmente intelligente risolve questi elementi come rappresentazioni della stessa idea, riconoscendo allo stesso tempo altre immagini come le loro idee distinte.

[00:49] But if I told you, hey, sit down and write for me a program that takes in a grid of 28x28 pixels like this and outputs a single number between 0 and 10, telling you what it thinks the digit is, well the task goes from comically trivial to
  Ma se ti dicessi, ehi, siediti e scrivimi un programma che prenda una griglia di 28x28 pixel come questa e restituisca un singolo numero tra 0 e 10, dicendoti cosa pensa che sia la cifra, beh, il compito passa dall'essere comicamente banale a

[01:04] Dauntingly difficult.
  Spaventosamente difficile.

[01:07] Unless you've been living under a rock, I think I hardly need to motivate the relevance and importance of machine learning and neural networks to the present and to the future.
  A meno che non abbiate vissuto sotto una roccia, penso che non ci sia bisogno di motivare la rilevanza e l'importanza del machine learning e delle reti neurali per il presente e per il futuro.

[01:15] But what I want to do here is show you what a neural network actually is, assuming no background, and to help visualize what it's doing, not as a buzzword but as a piece of math.
  Ma quello che voglio fare qui è mostrarvi cosa sia effettivamente una rete neurale, senza dare nulla per scontato, e aiutarvi a visualizzare cosa stia facendo, non come una parola di moda ma come un pezzo di matematica.

[01:25] My hope is that you come away feeling like the structure itself is motivated, and to feel like you know what it means when you read, or you hear about a neural network quote-unquote learning.
  La mia speranza è che ne usciate sentendo che la struttura stessa è motivata, e sentendo di sapere cosa significhi quando leggete, o sentite parlare di una rete neurale che, tra virgolette, impara.

[01:35] This video is just going to be devoted to the structure component of that, and the following one is going to tackle learning.
  Questo video sarà dedicato solo alla componente strutturale di tutto ciò, e il prossimo affronterà l'apprendimento.

[01:41] What we're going to do is put together a neural network that can learn to recognize handwritten digits.
  Quello che faremo è mettere insieme una rete neurale in grado di imparare a riconoscere cifre scritte a mano.

[01:49] This is a somewhat classic example for introducing the topic, and I'm happy to stick with the status quo here, because at the end of the two videos I want to point you to a couple good resources where you can learn more, and where you can download the code that does this and play with it on your own computer.
  Questo è un esempio piuttosto classico per introdurre l'argomento, e sono felice di attenermi allo status quo qui, perché alla fine dei due video voglio indicarvi un paio di buone risorse dove potete imparare di più, e dove potete scaricare il codice che fa questo e giocarci sul vostro computer.

[02:05] There are many many variants of neural networks.
  Ci sono molte, molte varianti di reti neurali.

[02:07] And in recent years there's been sort of a boom in research towards these variants.
  E negli ultimi anni c'è stato una sorta di boom nella ricerca verso queste varianti.

[02:12] But in these two introductory videos you and I are just going to look at the simplest plain vanilla form with no added frills.
  Ma in questi due video introduttivi io e te esamineremo solo la forma più semplice, quella base, senza fronzoli aggiunti.

[02:19] This is kind of a necessary prerequisite for understanding any of the more powerful modern variants, and trust me it still has plenty of complexity for us to wrap our minds around.
  Questo è una sorta di prerequisito necessario per comprendere una qualsiasi delle varianti moderne più potenti e, credimi, ha ancora molta complessità su cui dobbiamo riflettere.

[02:29] But even in this simplest form it can learn to recognize handwritten digits, which is a pretty cool thing for a computer to be able to do.
  Ma anche in questa forma più semplice può imparare a riconoscere cifre scritte a mano, il che è una cosa piuttosto interessante che un computer possa fare.

[02:37] And at the same time you'll see how it does fall short of a couple hopes that we might have for it.
  E allo stesso tempo vedrai come non riesca a soddisfare un paio di speranze che potremmo nutrire nei suoi confronti.

[02:43] As the name suggests neural networks are inspired by the brain, but let's break that down.
  Come suggerisce il nome, le reti neurali sono ispirate al cervello, ma analizziamo la cosa.

[02:48] What are the neurons, and in what sense are they linked together?
  Cosa sono i neuroni e in che senso sono collegati tra loro?

[02:52] Right now when I say neuron all I want you to think about is a thing that holds a number, specifically a number between 0 and 1.
  In questo momento, quando dico neurone, tutto ciò che voglio che tu pensi è una cosa che contiene un numero, specificamente un numero tra 0 e 1.

[03:00] It's really not more than that.
  Non è davvero nulla di più.

[03:03] For example the network starts with a bunch of neurons corresponding to
  Per esempio, la rete inizia con un gruppo di neuroni corrispondenti a

[03:08] Each of the 28x28 pixels of the input image, which is 784 neurons in total.
  Ognuno dei pixel 28x28 dell'immagine di input, che conta 784 neuroni in totale.

[03:14] Each one of these holds a number that represents the grayscale value of the corresponding pixel, ranging from 0 for black pixels up to 1 for white pixels.
  Ognuno di questi contiene un numero che rappresenta il valore in scala di grigi del pixel corrispondente, che va da 0 per i pixel neri fino a 1 per i pixel bianchi.

[03:25] This number inside the neuron is called its activation, and the image you might have in mind here is that each neuron is lit up when its activation is a high number.
  Questo numero all'interno del neurone è chiamato attivazione, e l'immagine che potresti avere in mente qui è che ogni neurone si illumina quando la sua attivazione è un numero alto.

[03:36] So all of these 784 neurons make up the first layer of our network.
  Quindi tutti questi 784 neuroni costituiscono il primo strato della nostra rete.

[03:46] Now jumping over to the last layer, this has 10 neurons, each representing one of the digits.
  Passando ora all'ultimo strato, questo ha 10 neuroni, ognuno dei quali rappresenta una delle cifre.

[03:52] The activation in these neurons, again some number that's between 0 and 1, represents how much the system thinks that a given image corresponds with a given digit.
  L'attivazione in questi neuroni, ancora una volta un numero compreso tra 0 e 1, rappresenta quanto il sistema ritiene che una data immagine corrisponda a una data cifra.

[04:03] There's also a couple layers in between called the hidden layers, which for the time being should just be a giant question mark for.
  Ci sono anche un paio di strati nel mezzo chiamati strati nascosti, che per il momento dovrebbero essere solo un gigantesco punto interrogativo per.

[04:09] How on earth this process of recognizing digits is going to be handled?
  Come diavolo verrà gestito questo processo di riconoscimento delle cifre?

[04:14] In this network I chose two hidden layers, each one with 16 neurons, and admittedly that's kind of an arbitrary choice.
  In questa rete ho scelto due strati nascosti, ognuno con 16 neuroni, e bisogna ammettere che è una scelta piuttosto arbitraria.

[04:21] To be honest I chose two layers based on how I want to motivate the structure in just a moment, and 16, well that was just a nice number to fit on the screen.
  Ad essere onesto, ho scelto due strati in base a come voglio motivare la struttura tra un momento, e 16, beh, era solo un bel numero da far stare sullo schermo.

[04:28] In practice there is a lot of room for experiment with a specific structure here.
  In pratica, c'è molto spazio per sperimentare con una struttura specifica qui.

[04:33] The way the network operates, activations in one layer determine the activations of the next layer.
  Il modo in cui opera la rete, le attivazioni in uno strato determinano le attivazioni dello strato successivo.

[04:39] And of course the heart of the network as an information processing mechanism comes down to exactly how those activations from one layer bring about activations in the next layer.
  E naturalmente il cuore della rete come meccanismo di elaborazione delle informazioni si riduce esattamente a come quelle attivazioni da uno strato portano alle attivazioni nello strato successivo.

[04:49] It's meant to be loosely analogous to how in biological networks of neurons, some groups of neurons firing cause certain others to fire.
  Vuole essere vagamente analogo a come nelle reti biologiche di neuroni, alcuni gruppi di neuroni che si attivano ne fanno attivare altri.

[04:58] Now the network I'm showing here has already been trained to recognize digits, and let me show you what I mean by that.
  Ora, la rete che sto mostrando qui è già stata addestrata a riconoscere le cifre, e lasciatemi mostrare cosa intendo con questo.

[05:03] It means if you feed in an image, lighting up all 784 neurons of the input layer according to the brightness of each pixel in the image,
  Significa che se inserisci un'immagine, illuminando tutti i 784 neuroni dello strato di input in base alla luminosità di ogni pixel nell'immagine,

[05:11] That pattern of activations causes some very specific pattern in the next layer.
  Quel modello di attivazioni causa un modello molto specifico nello strato successivo.

[05:16] Which causes some pattern in the one after it.
  Il che causa un modello in quello successivo.

[05:18] Which finally gives some pattern in the output layer.
  Che infine fornisce un modello nello strato di output.

[05:22] And the brightest neuron of that output layer is the network's choice, so to speak, for what digit this image represents.
  E il neurone più luminoso di quello strato di output è la scelta della rete, per così dire, per quale cifra questa immagine rappresenti.

[05:32] And before jumping into the math for how one layer influences the next, or how training works, let's just talk about why it's even reasonable to expect a layered structure like this to behave intelligently.
  E prima di passare alla matematica su come uno strato influenza il successivo, o su come funziona l'addestramento, parliamo del perché sia ragionevole aspettarsi che una struttura a strati come questa si comporti in modo intelligente.

[05:44] What are we expecting here?
  Cosa ci aspettiamo qui?

[05:45] What is the best hope for what those middle layers might be doing?
  Qual è la speranza migliore per ciò che quegli strati intermedi potrebbero fare?

[05:48] Well, when you or I recognize digits, we piece together various components.
  Beh, quando tu o io riconosciamo le cifre, mettiamo insieme vari componenti.

[05:54] A 9 has a loop up top and a line on the right.
  Un 9 ha un cerchio in alto e una linea sulla destra.

[05:57] An 8 also has a loop up top, but it's paired with another loop down low.
  Anche un 8 ha un cerchio in alto, ma è accoppiato con un altro cerchio in basso.

[06:02] A 4 basically breaks down into three specific lines, and things like that.
  Un 4 si scompone fondamentalmente in tre linee specifiche, e cose del genere.

[06:07] Now in a perfect world, we might hope that each neuron in the second.
  Ora, in un mondo perfetto, potremmo sperare che ogni neurone nel secondo.

[06:11] To last layer corresponds with one of these subcomponents.
  L'ultimo strato corrisponde a uno di questi sottocomponenti.

[06:15] That anytime you feed in an image with, say, a loop up top, like a 9 or an 8, there's some specific neuron whose activation is going to be close to 1.
  Che ogni volta che inserisci un'immagine con, diciamo, un cerchio in alto, come un 9 o un 8, c'è un neurone specifico la cui attivazione sarà vicina a 1.

[06:24] And I don't mean this specific loop of pixels.
  E non intendo questo specifico cerchio di pixel.

[06:26] The hope would be that any generally loopy pattern towards the top sets off this neuron.
  La speranza sarebbe che qualsiasi motivo generalmente circolare verso l'alto attivi questo neurone.

[06:32] That way, going from the third layer to the last one just requires learning which combination of subcomponents corresponds to which digits.
  In questo modo, passare dal terzo strato all'ultimo richiede solo di imparare quale combinazione di sottocomponenti corrisponde a quali cifre.

[06:41] Of course, that just kicks the problem down the road, because how would you recognize these subcomponents, or even learn what the right subcomponents should be?
  Naturalmente, questo sposta solo il problema più avanti, perché come si potrebbero riconoscere questi sottocomponenti, o addirittura imparare quali dovrebbero essere i sottocomponenti giusti?

[06:48] And I still haven't even talked about how one layer influences the next, but run with me on this one for a moment.
  E non ho ancora nemmeno parlato di come uno strato influenzi il successivo, ma seguitemi su questo per un momento.

[06:53] Recognizing a loop can also break down into subproblems.
  Riconoscere un cerchio può anche essere suddiviso in sottoproblemi.

[06:57] One reasonable way to do this would be to first recognize the various little edges that make it up.
  Un modo ragionevole per farlo sarebbe riconoscere prima i vari piccoli bordi che lo compongono.

[07:03] Similarly, a long line, like the kind you might see in the digits 1 or 4 or 7, is really just a long edge, or maybe you think of it as a certain pattern of several.
  Allo stesso modo, una linea lunga, come quella che potresti vedere nelle cifre 1, 4 o 7, è in realtà solo un bordo lungo, o forse la pensi come un certo schema di diversi elementi.

[07:13] Smaller edges.
  Bordi più piccoli.

[07:15] So maybe our hope is that each neuron in the second layer of the network corresponds with the various relevant little edges.
  Quindi forse la nostra speranza è che ogni neurone nel secondo strato della rete corrisponda ai vari piccoli bordi rilevanti.

[07:23] Maybe when an image like this one comes in, it lights up all of the neurons associated with around 8 to 10 specific little edges, which in turn lights up the neurons associated with the upper loop and a long vertical line, and those light up the neuron associated with a 9.
  Forse quando arriva un'immagine come questa, si accendono tutti i neuroni associati a circa 8-10 piccoli bordi specifici, che a loro volta accendono i neuroni associati al cappio superiore e a una lunga linea verticale, e questi accendono il neurone associato a un 9.

[07:40] Whether or not this is what our final network actually does is another question, one that I'll come back to once we see how to train the network, but this is a hope that we might have, a sort of goal with the layered structure like this.
  Se questo sia o meno ciò che la nostra rete finale fa effettivamente è un'altra questione, a cui tornerò una volta visto come addestrare la rete, ma questa è una speranza che potremmo avere, una sorta di obiettivo con una struttura a strati come questa.

[07:53] Moreover, you can imagine how being able to detect edges and patterns like this would be really useful for other image recognition tasks.
  Inoltre, puoi immaginare come essere in grado di rilevare bordi e schemi come questo sarebbe davvero utile per altri compiti di riconoscimento delle immagini.

[08:00] And even beyond image recognition, there are all sorts of intelligent things you might want to do that break down into layers of abstraction.
  E anche oltre il riconoscimento delle immagini, ci sono tutti i tipi di cose intelligenti che potresti voler fare che si suddividono in livelli di astrazione.

[08:08] Parsing speech, for example, involves taking raw audio and picking out distinct sounds, which combine to make certain syllables, which combine to form words.
  Analizzare il parlato, ad esempio, comporta prendere l'audio grezzo e isolare suoni distinti, che si combinano per creare determinate sillabe, che si combinano per formare parole.

[08:16] Which combine to make up phrases and more abstract thoughts, etc.
  Che si combinano per formare frasi e pensieri più astratti, ecc.

[08:21] But getting back to how any of this actually works, picture yourself right now designing how exactly the activations in one layer might determine the activations in the next.
  Ma tornando a come tutto questo funzioni realmente, immagina di progettare proprio ora come esattamente le attivazioni in uno strato possano determinare le attivazioni in quello successivo.

[08:30] The goal is to have some mechanism that could conceivably combine pixels into edges, or edges into patterns, or patterns into digits.
  L'obiettivo è avere un meccanismo che possa concebilmente combinare pixel in bordi, o bordi in schemi, o schemi in cifre.

[08:39] And to zoom in on one very specific example, let's say the hope is for one particular neuron in the second layer to pick up on whether or not the image has an edge in this region here.
  E per concentrarci su un esempio molto specifico, diciamo che la speranza è che un particolare neurone nel secondo strato rilevi se l'immagine ha o meno un bordo in questa regione qui.

[08:51] The question at hand is what parameters should the network have?
  La domanda in questione è: quali parametri dovrebbe avere la rete?

[08:55] What dials and knobs should you be able to tweak so that it's expressive enough to potentially capture this pattern, or any other pixel pattern, or the pattern that several edges can make a loop, and other such things?
  Quali manopole e controlli dovresti essere in grado di regolare affinché sia abbastanza espressiva da catturare potenzialmente questo schema, o qualsiasi altro schema di pixel, o lo schema per cui diversi bordi possono formare un ciclo, e altre cose simili?

[09:08] Well, what we'll do is assign a weight to each one of the connections between our neuron and the neurons from the first layer.
  Bene, quello che faremo è assegnare un peso a ciascuna delle connessioni tra il nostro neurone e i neuroni del primo strato.

[09:16] These weights are just numbers.
  Questi pesi sono solo numeri.

[09:18] Then take all of those activations from the first layer and compute their weighted sum according to these weights.
  Quindi prendi tutte quelle attivazioni dal primo strato e calcola la loro somma ponderata in base a questi pesi.

[09:27] I find it helpful to think of these weights as being organized into a little grid of their own, and I'm going to use green pixels to indicate positive weights, and red pixels to indicate negative weights, where the brightness of that pixel is some loose depiction of the weight's value.
  Trovo utile pensare a questi pesi come organizzati in una loro piccola griglia, e userò pixel verdi per indicare i pesi positivi e pixel rossi per indicare i pesi negativi, dove la luminosità di quel pixel è una vaga rappresentazione del valore del peso.

[09:42] Now if we made the weights associated with almost all of the pixels zero except for some positive weights in this region that we care about, then taking the weighted sum of all the pixel values really just amounts to adding up the values of the pixel just in the region that we care about.
  Ora, se rendessimo zero i pesi associati a quasi tutti i pixel, eccetto per alcuni pesi positivi in questa regione che ci interessa, allora calcolare la somma ponderata di tutti i valori dei pixel equivale davvero solo a sommare i valori dei pixel proprio nella regione che ci interessa.

[09:59] And if you really wanted to pick up on whether there's an edge here, what you might do is have some negative weights associated with the surrounding pixels.
  E se volessi davvero capire se c'è un bordo qui, quello che potresti fare è avere dei pesi negativi associati ai pixel circostanti.

[10:07] Then the sum is largest when those middle pixels are bright but the surrounding pixels are darker.
  Allora la somma è massima quando quei pixel centrali sono luminosi ma i pixel circostanti sono più scuri.

[10:14] When you compute a weighted sum like this, you might come out with any number,
  Quando calcoli una somma ponderata come questa, potresti ottenere qualsiasi numero,

[10:18] But for this network, what we want is for activations to be some value between 0 and 1.
  Ma per questa rete, ciò che vogliamo è che le attivazioni siano un valore compreso tra 0 e 1.

[10:24] So a common thing to do is to pump this weighted sum into some function that squishes the real number line into the range between 0 and 1.
  Quindi, una cosa comune da fare è inserire questa somma pesata in una funzione che comprime la retta dei numeri reali nell'intervallo tra 0 e 1.

[10:32] And a common function that does this is called the sigmoid function, also known as a logistic curve.
  E una funzione comune che fa questo è chiamata funzione sigmoide, nota anche come curva logistica.

[10:38] Basically, very negative inputs end up close to 0, positive inputs end up close to 1, and it just steadily increases around the input 0.
  Fondamentalmente, gli input molto negativi finiscono vicino a 0, gli input positivi finiscono vicino a 1, e aumenta costantemente attorno all'input 0.

[10:49] So the activation of the neuron here is basically a measure of how positive the relevant weighted sum is.
  Quindi l'attivazione del neurone qui è fondamentalmente una misura di quanto sia positiva la somma pesata rilevante.

[10:57] But maybe it's not that you want the neuron to light up when the weighted sum is bigger than 0.
  Ma forse non vuoi che il neurone si accenda quando la somma pesata è maggiore di 0.

[11:02] Maybe you only want it to be active when the sum is bigger than, say, 10.
  Forse vuoi che sia attivo solo quando la somma è maggiore, diciamo, di 10.

[11:06] That is, you want some bias for it to be inactive.
  Cioè, vuoi un certo bias affinché rimanga inattivo.

[11:11] What we'll do then is just add in some other number like negative 10 to this weighted sum before plugging it through the sigmoid squishification function.
  Ciò che faremo allora è semplicemente aggiungere un altro numero, come meno 10, a questa somma pesata prima di inserirla nella funzione di compressione sigmoide.

[11:20] That additional number is called the bias.
  Quel numero aggiuntivo è chiamato bias.

[11:23] So the weights tell you what pixel pattern this neuron in the second layer is picking up on, and the bias tells you how high the weighted sum needs to be before the neuron starts getting meaningfully active.
  Quindi i pesi ti dicono quale pattern di pixel questo neurone nel secondo strato sta rilevando, e il bias ti dice quanto deve essere alta la somma pesata prima che il neurone inizi a diventare significativamente attivo.

[11:36] And that is just one neuron.
  E questo è solo un neurone.

[11:38] Every other neuron in this layer is going to be connected to all 784 pixel neurons from the first layer, and each one of those 784 connections has its own weight associated with it.
  Ogni altro neurone in questo strato sarà collegato a tutti i 784 neuroni pixel del primo strato, e ognuna di quelle 784 connessioni ha il proprio peso associato.

[11:51] Also, each one has some bias, some other number that you add on to the weighted sum before squishing it with the sigmoid.
  Inoltre, ognuno ha un certo bias, un altro numero che aggiungi alla somma pesata prima di comprimerla con la sigmoide.

[11:58] And that's a lot to think about!
  Ed è molto a cui pensare!

[12:00] With this hidden layer of 16 neurons, that's a total of 784 times 16 weights, along with 16 biases.
  Con questo strato nascosto di 16 neuroni, si tratta di un totale di 784 per 16 pesi, insieme a 16 bias.

[12:08] And all of that is just the connections from the first layer to the second.
  E tutto ciò riguarda solo le connessioni dal primo al secondo strato.

[12:12] The connections between the other layers also have a bunch of weights and biases associated with them.
  Anche le connessioni tra gli altri strati hanno un sacco di pesi e bias associati.

[12:18] All said and done, this network has almost exactly 13,000 total weights and biases.
  Tutto sommato, questa rete ha quasi esattamente 13.000 pesi e bias totali.

[12:23] 13,000 knobs and dials that can be tweaked and turned to make this network behave in different ways.
  13.000 manopole e quadranti che possono essere regolati e girati per far sì che questa rete si comporti in modi diversi.

[12:31] So when we talk about learning, what that's referring to is getting the computer to find a valid setting for all of these many many numbers so that it'll actually solve the problem at hand.
  Quindi, quando parliamo di apprendimento, ci riferiamo al far trovare al computer un'impostazione valida per tutti questi tantissimi numeri, in modo che possa effettivamente risolvere il problema in questione.

[12:42] One thought experiment that is at once fun and kind of horrifying is to imagine sitting down and setting all of these weights and biases by hand, purposefully tweaking the numbers so that the second layer picks up on edges, the third layer picks up on patterns, etc.
  Un esperimento mentale che è allo stesso tempo divertente e un po' terrificante è immaginare di sedersi e impostare tutti questi pesi e bias a mano, modificando intenzionalmente i numeri in modo che il secondo strato rilevi i bordi, il terzo strato rilevi i pattern, ecc.

[12:57] I personally find this satisfying rather than just treating the network as a total black box, because when the network doesn't perform the way you anticipate, if you've built up a little bit of a relationship with what those weights and biases actually mean, you have a starting place for experimenting with how to change the structure to improve.
  Personalmente trovo che questo sia soddisfacente piuttosto che trattare semplicemente la rete come una scatola nera, perché quando la rete non funziona come previsto, se hai costruito un minimo di relazione con ciò che quei pesi e bias significano realmente, hai un punto di partenza per sperimentare come cambiare la struttura per migliorare.

[13:15] Or when the network does work but not for the reasons you might expect, digging into what the weights and biases are doing is a good way to challenge your assumptions and really expose the full space of possible solutions.
  Oppure, quando la rete funziona ma non per i motivi che potresti aspettarti, scavare in ciò che stanno facendo i pesi e i bias è un buon modo per mettere in discussione le tue ipotesi ed esporre davvero l'intero spazio delle possibili soluzioni.

[13:26] By the way, the actual function here is a little cumbersome to write down, don't you think?
  A proposito, la funzione reale qui è un po' complicata da scrivere, non credi?

[13:32] So let me show you a more notationally compact way that these connections are represented.
  Quindi lasciatemi mostrare un modo notazionalmente più compatto in cui queste connessioni vengono rappresentate.

[13:37] This is how you'd see it if you choose to read up more about neural networks.
  È così che lo vedreste se sceglieste di approfondire le reti neurali.

[13:40] Organize all of the activations from one layer into a column as a vector.
  Organizzate tutte le attivazioni di uno strato in una colonna come un vettore.

[13:48] Then organize all of the weights as a matrix, where each row of that matrix corresponds to the connections between one layer and a particular neuron in the next layer.
  Quindi organizzate tutti i pesi come una matrice, dove ogni riga di quella matrice corrisponde alle connessioni tra uno strato e un particolare neurone nello strato successivo.

[13:58] What that means is that taking the weighted sum of the activations in the first layer according to these weights corresponds to one of the terms in the matrix vector product of everything we have on the left here.
  Ciò significa che calcolare la somma ponderata delle attivazioni nel primo strato in base a questi pesi corrisponde a uno dei termini nel prodotto matrice-vettore di tutto ciò che abbiamo qui a sinistra.

[14:14] By the way, so much of machine learning just comes down to having a good grasp of linear algebra, so for any of you who want a nice visual understanding for matrices and what matrix vector multiplication means, take a look at the series I did on linear algebra, especially chapter 3.
  A proposito, gran parte del machine learning si riduce semplicemente ad avere una buona padronanza dell'algebra lineare, quindi per chiunque di voi voglia una buona comprensione visiva delle matrici e di cosa significhi la moltiplicazione matrice-vettore, date un'occhiata alla serie che ho fatto sull'algebra lineare, specialmente al capitolo 3.

[14:29] Back to our expression, instead of talking about adding the bias to each one of these values independently, we represent it by organizing all those biases into a vector, and adding the entire vector to the previous matrix vector product.
  Tornando alla nostra espressione, invece di parlare dell'aggiunta del bias a ciascuno di questi valori indipendentemente, lo rappresentiamo organizzando tutti quei bias in un vettore e aggiungendo l'intero vettore al precedente prodotto matrice-vettore.

[14:43] Then as a final step, I'll wrap a sigmoid around the outside here, and what that's supposed to represent is that you're going to apply the sigmoid function to each specific component of the resulting vector inside.
  Poi, come passaggio finale, avvolgerò una sigmoide all'esterno qui, e ciò che questo dovrebbe rappresentare è che applicherai la funzione sigmoide a ogni specifica componente del vettore risultante all'interno.

[14:55] So once you write down this weight matrix and these vectors as their own symbols, you can communicate the full transition of activations from one layer to the next in an extremely tight and neat little expression, and this makes the relevant code both a lot simpler and a lot faster, since many libraries optimize the heck out of matrix multiplication.
  Quindi, una volta scritta questa matrice dei pesi e questi vettori come simboli propri, puoi comunicare l'intera transizione delle attivazioni da uno strato all'altro in un'espressione estremamente concisa e ordinata, e questo rende il codice pertinente sia molto più semplice che molto più veloce, poiché molte librerie ottimizzano al massimo la moltiplicazione tra matrici.

[15:17] Remember how earlier I said these neurons are simply things that hold numbers?
  Ricordi come prima ho detto che questi neuroni sono semplicemente cose che contengono numeri?

[15:22] Well of course the specific numbers that they hold depends on the image you feed in, so it's actually more accurate to think of each neuron as a function,
  Beh, naturalmente i numeri specifici che contengono dipendono dall'immagine che inserisci, quindi è in realtà più accurato pensare a ogni neurone come a una funzione,

[15:31] One that takes in the outputs of all the neurons in the previous layer and spits out a number between 0 and 1.
  Uno che prende in input gli output di tutti i neuroni dello strato precedente e sputa fuori un numero compreso tra 0 e 1.

[15:39] Really the entire network is just a function, one that takes in 784 numbers as an input and spits out 10 numbers as an output.
  In realtà l'intera rete è solo una funzione, una che prende in input 784 numeri e sputa fuori 10 numeri come output.

[15:47] It's an absurdly complicated function, one that involves 13,000 parameters in the forms of these weights and biases that pick up on certain patterns, and which involves iterating many matrix vector products and the sigmoid squishification function, but it's just a function nonetheless.
  È una funzione assurdamente complicata, che coinvolge 13.000 parametri sotto forma di pesi e bias che individuano determinati schemi, e che comporta l'iterazione di molti prodotti matrice-vettore e la funzione di schiacciamento sigmoide, ma è comunque solo una funzione.

[16:03] And in a way it's kind of reassuring that it looks complicated.
  E in un certo senso è rassicurante che sembri complicata.

[16:07] I mean if it were any simpler, what hope would we have that it could take on the challenge of recognizing digits?
  Voglio dire, se fosse più semplice, che speranza avremmo che possa affrontare la sfida di riconoscere le cifre?

[16:13] And how does it take on that challenge?
  E come affronta questa sfida?

[16:15] How does this network learn the appropriate weights and biases just by looking at data?
  Come fa questa rete a imparare i pesi e i bias appropriati semplicemente guardando i dati?

[16:20] Well that's what I'll show in the next video, and I'll also dig a little more into what this particular network we're seeing is really doing.
  Bene, questo è ciò che mostrerò nel prossimo video, e approfondirò anche un po' cosa sta realmente facendo questa particolare rete che stiamo vedendo.

[16:27] Now is the point I suppose I should say subscribe to stay notified about when that video or any new videos come out.
  Ora è il momento in cui suppongo dovrei dire di iscriversi per rimanere aggiornati su quando uscirà quel video o qualsiasi nuovo video.

[16:33] But realistically, most of you don't actually receive notifications from YouTube, do you?
  Ma realisticamente, la maggior parte di voi non riceve davvero notifiche da YouTube, vero?

[16:38] Maybe more honestly I should say subscribe so that the neural networks that underlie YouTube's recommendation algorithm are primed to believe that you want to see content from this channel get recommended to you.
  Forse, più onestamente, dovrei dire di iscriversi in modo che le reti neurali alla base dell'algoritmo di raccomandazione di YouTube siano predisposte a credere che vogliate che i contenuti di questo canale vi vengano raccomandati.

[16:48] Anyway, stay posted for more.
  Comunque, restate sintonizzati per altro.

[16:50] Thank you very much to everyone supporting these videos on Patreon.
  Grazie mille a tutti coloro che sostengono questi video su Patreon.

[16:54] I've been a little slow to progress in the probability series this summer, but I'm jumping back into it after this project, so patrons you can look out for updates there.
  Sono stato un po' lento a progredire nella serie sulla probabilità quest'estate, ma ci tornerò sopra dopo questo progetto, quindi i sostenitori possono aspettarsi aggiornamenti a riguardo.

[17:03] To close things off here I have with me Lisha Li who did her PhD work on the theoretical side of deep learning and who currently works at a venture capital firm called Amplify Partners who kindly provided some of the funding for this video.
  Per concludere, ho qui con me Lisha Li, che ha svolto il suo dottorato di ricerca sull'aspetto teorico del deep learning e che attualmente lavora presso una società di venture capital chiamata Amplify Partners, che ha gentilmente fornito parte dei finanziamenti per questo video.

[17:15] So Lisha, one thing I think we should quickly bring up is this sigmoid function.
  Quindi Lisha, una cosa che penso dovremmo menzionare rapidamente è questa funzione sigmoide.

[17:19] As I understand it, early networks use this to squish the relevant weighted sum into that interval between zero and one, you know, kind of motivated by this biological analogy of neurons either being inactive or active.
  Per quanto ho capito, le prime reti la usavano per comprimere la somma ponderata rilevante in quell'intervallo tra zero e uno, sai, un po' motivata da questa analogia biologica dei neuroni che sono inattivi o attivi.

[17:30] Exactly.
  Esatto.

[17:30] But relatively few modern networks actually use sigmoid anymore.
  Ma relativamente poche reti moderne usano ancora la sigmoide.

[17:34] Yeah.
  Sì.

[17:34] It's kind of old school, right?
  È un po' vecchia scuola, vero?

[17:35] Yeah, or rather ReLU seems to be much easier to train.
  Sì, o meglio, ReLU sembra essere molto più facile da addestrare.

[17:39] And ReLU, ReLU stands for rectified linear unit?
  E ReLU, ReLU sta per unità lineare rettificata?

[17:42] Yes, it's this kind of function where you're just taking a max of zero and a where a is given by what you were explaining in the video.
  Sì, è questo tipo di funzione in cui prendi semplicemente il massimo tra zero e a, dove a è dato da ciò che stavi spiegando nel video.

[17:52] And what this was sort of motivated from, I think, was partially by a biological analogy with how neurons would either be activated or not.
  E penso che ciò da cui è stato motivato, in parte, sia stata un'analogia biologica con il modo in cui i neuroni vengono attivati o meno.

[18:01] And so if it passes a certain threshold it would be the identity function, but if it did not then it would just not be activated, so it'd be zero, so it's kind of a simplification.
  Quindi, se supera una certa soglia, sarebbe la funzione identità, ma se non lo facesse, non verrebbe attivata, quindi sarebbe zero; è una sorta di semplificazione.

[18:11] Using sigmoids didn't help training or it was very difficult to train at some point and people just tried ReLU and it happened to work very well for these incredibly deep neural networks.
  Usare le sigmoidi non aiutava l'addestramento o era molto difficile da addestrare a un certo punto, così le persone hanno provato ReLU e ha funzionato molto bene per queste reti neurali incredibilmente profonde.

[18:25] All right, thank you Lisha.
  Va bene, grazie Lisha.
