0Pricing
Deep Learning Academy · บทเรียน

คอนโวลูชัน: เคอร์เนลเลื่อนไปบนพิกเซล

ตัวกรองตรวจจับขอบและพื้นผิวได้อย่างไร

คอนโวลูชัน: เคอร์เนลเลื่อนไปบนพิกเซล เป็นบทเรียน Deep Learning Academy ฟรีบน CoddyKit นี่คือบทเรียนที่ 1 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน Deep Learning Academy และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส Deep Learning Academy มีบทเรียนทั้งหมด 4 บทเรียน

บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ

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. 🎉

คำถามที่พบบ่อย

บทเรียน “คอนโวลูชัน: เคอร์เนลเลื่อนไปบนพิกเซล” ฟรีหรือไม่

ใช่ — ข้อความเต็มของ “คอนโวลูชัน: เคอร์เนลเลื่อนไปบนพิกเซล” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส Deep Learning Academy ให้อัปเกรดเป็น CoddyKit PRO คอร์ส Deep Learning Academy มีบทเรียนทั้งหมด 4 บทเรียน

คุณจะเรียนรู้อะไรในบทเรียน “คอนโวลูชัน: เคอร์เนลเลื่อนไปบนพิกเซล”

ตัวกรองตรวจจับขอบและพื้นผิวได้อย่างไร คุณปฏิบัติ Deep Learning Academy ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน

คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน Deep Learning Academy หรือไม่

ไม่จำเป็นต้องมีประสบการณ์มาก่อน Deep Learning Academy บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 1 จากทั้งหมด 4 บทเรียน

บทเรียน “คอนโวลูชัน: เคอร์เนลเลื่อนไปบนพิกเซล” ใช้เวลานานแค่ไหน

บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย

ฉันเขียนและรันโค้ดในบทเรียน Deep Learning Academy นี้ได้ไหม

ได้ บทเรียน Deep Learning Academy ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ

บทเรียนทั้งหมดในหลักสูตรนี้

  1. คอนโวลูชัน: เคอร์เนลเลื่อนไปบนพิกเซล
  2. สไตรด์ แพดดิง และพูลลิง
  3. ช่อง แผนที่คุณลักษณะ และขอบเขตรับข้อมูล
  4. ประกอบตัวจำแนกภาพด้วย CNN
← กลับไปที่ Deep Learning Academy