Skip to course content
Free PyTorch course

Advanced Deep Learning with PyTorch

Module 04 Knowledge Check

5 questions. Pass mark 4 out of 5. Answer every question before checking the answer key below, then retry after reading the feedback.

1. What happens when you stack two nn.Linear layers with no activation between them?

2. Which loss expects raw logits rather than probabilities?

3. CrossEntropyLoss expects targets in what form?

4. Age spans 18-68 and income spans 100,000-1,000,000. Why does that hurt training?

5. Your network scores 0.87 and logistic regression scores 0.86. What is the honest conclusion?

---

Answer Key and Explanations

Check these only after attempting every question.

1. B — They compose into a single linear layer

A matrix multiply of a matrix multiply is one matrix multiply. All the extra parameters buy nothing without a non-linearity.

2. B — BCEWithLogitsLoss

It applies the sigmoid internally and is more numerically stable than sigmoid followed by BCELoss. Passing already-squashed values squashes them twice.

3. B — Class indices

Passing one-hot targets raises an error, which is the good case — the silent failures are worse.

4. B — Gradient descent takes the same-sized step in every direction, so one feature dominates

A learning rate small enough to be stable for income barely moves age. Standardising puts them on comparable footing.

5. B — The network has not earned its complexity here

A one-point gap does not justify the training time, the harder debugging, or the reduced interpretability.

Practical Check

Apply this module to your own work: complete the module activity for *Feed-Forward Networks for Structured Data*, then write one sentence naming what your result shows and one naming what it does not.

Strong Answer Pattern

A strong answer names the task, the evidence used, the check performed, and the remaining limitation. It avoids "proved", "guaranteed", or "always" unless the evidence genuinely supports it.