Mathematics Useful for Deep Learning

2 min
  1. If X is B×D and W is D×H, what is the shape of XW?
  2. What shape must ∂L/∂W have?
  3. Why subtract the maximum logit before softmax?
  4. What is a gradient check for?
  5. [E] Why are dimensions a reasoning test?

Answers. 1. B×H. 2. D×H, like W. 3. To prevent overflow without changing probabilities. 4. To compare analytical derivative and finite difference. 5. An operation whose dimensions do not compose cannot be the announced computation.

Objective: master the tools needed to reason about a network without turning the course into a math treatise.

Linear algebra

A batch is a matrix X ∈ R^(n×d). A dense layer computes Z = XW + b, with W ∈ R^(d×h). Checking dimensions before any computation eliminates a large portion of errors. The dot product measures an alignment; the norm measures a size; a basis defines the directions used to describe the data.

Preview — the rest of the lesson is for enrolled readers.

Already enrolled with a code?

Your access is tied to your account, not to this link. Sign in with the same email you used in class: your course is waiting, no need to enter the code again.

Sign inNo account yet? Create one
This lesson is part of the “Modern Deep Dives” module

The first modules of the course are open to everyone. For the rest you have three options: buy this course once and for all, subscribe, or enter the code handed out in class.

Are you a student on this course?

The code is tied to your account: sign in or create an account and it will be applied automatically when you come back.

No account yet? Create one