Skip to course content
Free PyTorch course

Advanced Deep Learning with PyTorch

Unit ID: DLPY-M01-U02 Estimated active time: 25-35 minutes

More flexible means more ways to fail

Neural networks are flexible. That is their strength.

It is also their danger.

A flexible model can learn useful structure. It can also learn noise, shortcuts, leakage, spurious correlations, and patterns that do not survive outside the training data.

This is why deep learning needs care.

Data scale

Deep learning often needs more data than simpler models because it has many parameters. More parameters mean more ways to fit the training examples.

This does not mean every deep learning project needs millions of examples. Transfer learning can reduce the amount of task-specific data needed. But small data still requires caution.

Ask:

Compute

Deep learning can be expensive because training repeats many calculations.

The important terms are:

In this course, the required path is CPU-first. We will keep examples small.

Care

Care means the model is not trusted just because it trained.

Care includes:

The dangerous sentence

Be careful with this sentence:

> The model learned it.

That sentence can hide too much.

What did it learn? From which data? With which labels? Under which split? Does it work on new examples? Where does it fail? What happens if the input changes?

Use more careful language:

> On this validation set, the model reduced loss compared with the baseline, but error examples show it still fails on short noisy messages.

That sentence is less flashy. It is much more useful.

Mini practice

A learner trains a neural network on 500 rows. The training score is excellent. The validation score is weak.

What are three possible explanations?

Good answers include:

The answer is not simply use a bigger network.