0Pricing
Deep Learning Academy · Lezione

Convoluzione: i kernel scorrono sui pixel

Scopra come i filtri rilevano bordi e texture

Convoluzione: i kernel scorrono sui pixel è una lezione Deep Learning Academy gratuita su CoddyKit. Questa è la lezione 1 di 4. Puoi leggere la lezione completa qui gratuitamente — poi esercitati direttamente nel browser con un editor di codice integrato e un tutor IA disponibile 24/7. Fa parte del percorso di apprendimento Deep Learning Academy, e i tuoi progressi si sincronizzano tra il web e l'app CoddyKit. Il corso Deep Learning Academy include 4 lezioni in totale.

Parti di questa lezione non sono ancora state tradotte e vengono mostrate in inglese.

An Image Is Just Numbers

To a network, a photo is a grid of pixel values. A small grayscale image might be 28x28 numbers, each from 0 (black) to 255 (white).

Why Not Just Flatten It?

Flattening an image into one long vector throws away the spatial layout. Pixels near each other matter, and a plain dense layer ignores that.

Meet the Kernel

A kernel is a tiny grid of weights, often 3x3. It slides across the image, looking at one small patch at a time.

The Sliding Window

At each position the kernel covers a patch, multiplies overlapping values, and sums them into one number. Then it slides over and repeats. 🔍

That Sum Is the Output Pixel

Each weighted sum becomes a single pixel in the result. Slide across the whole image and you build a fresh grid called a feature map.

Kernels Detect Patterns

A well-tuned kernel lights up where its pattern appears. One kernel might fire on vertical edges, another on bright corners or smooth textures.

An Edge Detector by Hand

This classic 3x3 kernel responds strongly to vertical edges, where light meets dark across a column.

edge_kernel = [
    [-1, 0, 1],
    [-1, 0, 1],
    [-1, 0, 1],
]

The Weights Are Learned

You do not hand-pick kernel numbers. Training adjusts them so each filter learns whatever pattern helps the network classify images.

Same Kernel, Everywhere

One kernel reuses the same weights across the whole image. This weight sharing means far fewer parameters than a dense layer would need.

A Conv Layer in PyTorch

nn.Conv2d wraps all of this. Here a Conv2d takes 1 input channel and learns 8 different 3x3 kernels.

import torch.nn as nn
conv = nn.Conv2d(1, 8, kernel_size=3)

Many Kernels, Many Maps

That layer learns 8 kernels, so it outputs 8 feature maps. Each one highlights a different pattern the network found useful.

Quick Check

Let us check what a convolution kernel actually produces.

Recap: Kernels Slide

You learned that a kernel slides over pixels, summing weighted patches into a feature map. Its weights are learned, shared, and tuned to spot edges and textures. 🎉

Domande Frequenti

La lezione «Convoluzione: i kernel scorrono sui pixel» è gratuita?

Sì — il testo completo di «Convoluzione: i kernel scorrono sui pixel» è gratuito qui sul web. Per esercitarvi in modo interattivo (un editor di codice integrato e un tutor IA 24/7) e sbloccare il resto del corso Deep Learning Academy, passa a CoddyKit PRO. Il corso Deep Learning Academy include 4 lezioni in totale.

Cosa imparerò in «Convoluzione: i kernel scorrono sui pixel»?

Scopra come i filtri rilevano bordi e texture Eserciti Deep Learning Academy con codice pratico che esegui direttamente nel browser, e un tutor IA 24/7 risponde alle tue domande mentre lavori sulla lezione.

Ho bisogno di esperienza per iniziare Deep Learning Academy?

Non è richiesta alcuna esperienza precedente. Deep Learning Academy su CoddyKit è strutturato per principianti e studenti avanzati, quindi puoi iniziare da qui o dall'inizio e procedere al tuo ritmo. Questa è la lezione 1 di 4.

Quanto tempo richiede la lezione «Convoluzione: i kernel scorrono sui pixel»?

La maggior parte delle lezioni CoddyKit richiede circa 5–10 minuti. Ogni lezione è breve e interattiva, quindi fai progressi costanti e riprendi esattamente da dove hai lasciato su web e app.

Posso scrivere ed eseguire codice in questa lezione Deep Learning Academy?

Sì. Ogni lezione Deep Learning Academy include un editor di codice integrato, quindi scrivi ed esegui codice reale direttamente nel tuo browser e ricevi feedback istantaneo dall'IA — nessuna configurazione locale necessaria.

Tutte le lezioni di questo corso

  1. Convoluzione: i kernel scorrono sui pixel
  2. Stride, padding e pooling
  3. Canali, feature map e campi recettivi
  4. Assembli un classificatore di immagini CNN
← Torna a Deep Learning Academy