Deep Learning from Scratch (Part 2) – Intro 2

Running Your First Deep Learning Model Is Simpler Than It Used to Be

One of the biggest misconceptions I had before learning deep learning was that I would need an expensive computer to do anything meaningful.

Training neural networks requires a significant amount of computation. For a long time, that meant having access to powerful hardware. Today, however, getting started is much easier. This is because most beginners don’t train models entirely on their own machines.

Instead, they use cloud environments.

Platforms like Google Colab and Kaggle Notebooks provide browser-based notebooks where you can write Python code and access GPUs. Notably, you can experiment with deep learning models without spending hours configuring your local machine.

The notebook itself quickly becomes your workspace.

You write code and execute cells one by one. You also visualize outputs, inspect intermediate results, and document your experiments in the same place. It feels somewhere between an IDE, a lab notebook, and a report.

Kaggle Colab logo representing data science and machine learning.

One of the first things you’ll probably notice in Colab is that not every runtime is the same.

By default, your notebook runs on a CPU. For many deep learning tasks, switching to a GPU is one of the first settings you’ll change. In most introductory projects, a T4 GPU is more than sufficient. TPUs become useful for specific workloads and TensorFlow-based projects. Since these resources are shared, it’s also good practice to disconnect your runtime when you’re finished. This helps instead of leaving it running in the background.  

Once the environment is ready, you can move surprisingly quickly from theory to something tangible.

Small Example

A good example is face recognition.

From a user’s perspective, it looks simple. You upload a photo, and the system recognizes a face. Behind the scenes, though, several steps happen before any prediction is made.

First, the model detects whether a face exists in the image. Then it extracts numerical features that describe that face, such as the spatial relationships between facial landmarks. Instead of comparing raw images, modern systems compare these learned feature representations. If those representations are sufficiently similar to previously stored ones, the identity can be verified.  

One of the reasons this has become so accessible is the growing ecosystem of open-source libraries.

For example, DeepFace provides a high-level interface for tasks such as face recognition, age estimation, gender prediction, emotion detection, and race prediction. Underneath, multiple pretrained deep learning models handle the heavy lifting. This allows you to experiment with just a few lines of Python.  

DeepFace logo representing facial recognition technology and AI innovation.

One detail that often surprises beginners is what happens the first time you run one of these models.

The prediction doesn’t start immediately. Instead, the library downloads pretrained model weights, sometimes hundreds of megabytes in size. It can feel confusing at first. However, it’s actually a reminder that you’re not building a model from scratch every time. You’re downloading knowledge that has already been learned elsewhere and using it for your own task.  

Most projects don’t begin with weeks of training from random initialization. They begin with models that already know something about the world. Your job becomes deciding how to use or adapt them.

We’ll come back to that when we talk about pretrained models and transfer learning. These concepts are responsible for a large part of why deep learning has become so accessible over the last few years.

Leave a Reply

Create a website or blog at WordPress.com

Up ↑

Discover more from Writing my way through ideas.

Subscribe now to keep reading and get access to the full archive.

Continue reading