Skip to content

Commit 39010e4

Browse files
committed
Add torchdata install codecell to Transformer tutorial
Fixes #1996
1 parent 66b5e6b commit 39010e4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

beginner_source/transformer_tutorial.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,11 @@ def forward(self, x: Tensor) -> Tensor:
134134
######################################################################
135135
# This tutorial uses ``torchtext`` to generate Wikitext-2 dataset.
136136
# To access torchtext datasets, please install torchdata following instructions at https://github.com/pytorch/data.
137+
# %%
138+
# .. code-block:: bash
139+
#
140+
# %%bash
141+
# pip install torchdata
137142
#
138143
# The vocab object is built based on the train dataset and is used to numericalize
139144
# tokens into tensors. Wikitext-2 represents rare tokens as `<unk>`.

0 commit comments

Comments
 (0)