Lab 03 — Text Classification with Sequence and Attention

2 min
  1. Why fit the tokenizer on train only?
  2. What shape do IDs have for a batch B of length L?
  3. What test reveals badly masked padding?
  4. Why Macro-F1 rather than accuracy with rare classes?
  5. [E] What is the TF-IDF baseline for versus a GRU?

Answers. 1. Otherwise the vocabulary leaks statistics from the test. 2. B×L, like the mask. 3. Adding padding must not change the prediction. 4. Every class weighs equally. 5. It measures whether sequential order brings a gain beyond present words.

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 “Hands-on Labs (5 Labs)” 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