Commit d5f7a40
rename confusing variable name in LM tutorial (#1953)
The tutorial "Language Modeling with nn.Transformer and TorchText" contains
code snippets with variables named `batch_size`. The issue is that in some
places, `batch_size` means that number of sequences in a batch, and in other
places it means the number of tokens in each batch sequence. This inconsistency
was solved in this commit: `batch_size` was replaced with `seq_len` in the two
places where it has the latter meaning.
Co-authored-by: Svetlana Karslioglu <svekars@fb.com>1 parent ae22720 commit d5f7a40
1 file changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
301 | | - | |
302 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
331 | | - | |
332 | | - | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
| 335 | + | |
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| |||
0 commit comments