Course page
Log in

You are watching a free preview. Enroll to open all 24 lessons, track progress and ask the course tutor.

Enroll for $74.99

Section 1: Tensors, gradients and the training loop

What deep learning is good at

Video 8 min Lesson 1 of 24 Sample clip Preview

Deep learning uses neural networks with many layers to learn features directly from raw data. Classical machine learning usually needs people to design features, such as ratios or counts. A deep network learns its own features from pixels, characters or audio samples, which is why it dominates tasks like image recognition, speech and language.

When it shines

  • Unstructured data: images, audio, text and video, where hand crafted features are hard to design.
  • Large datasets: deep networks have many parameters and benefit from lots of examples.
  • Transfer learning: a model pretrained on a huge dataset can be adapted to your task with relatively little data.

When it does not

For tabular business data, such as customer records, gradient boosted trees often match or beat neural networks with far less effort and tuning. Deep learning is a powerful tool, not a default. A good practitioner tries a simple baseline first.

What a neural network is

At its core, a neural network is a function made of layers. Each layer applies a linear transformation (multiply by a weight matrix, add a bias) followed by a non linear activation function, such as ReLU. Stacking layers lets the network represent very complex functions. The weights start random and are adjusted during training to reduce a loss, a number measuring how wrong the predictions are.

The adjustment uses gradients: for each weight, how much the loss would change if the weight changed slightly. Moving each weight a little in the direction that reduces the loss, over and over, is called gradient descent. PyTorch computes these gradients automatically.

Why PyTorch

PyTorch builds computations as ordinary Python code that runs line by line. You can print tensors, use a debugger and write loops and conditions naturally. PyTorch 2 added torch.compile, which can speed up models without changing how you write them. The ecosystem includes torchvision for images, Hugging Face libraries for language models and many research codebases.

How this course works

We go from first principles to real models. You will write the training loop yourself before using any shortcuts, because when a real training run goes wrong, understanding the loop is what lets you fix it. Every lesson has a notebook, and the larger exercises include settings for CPU and GPU.

← → switch lessons