Skip to content

Commit c5b56ae

Browse files
authored
Change description of batchify
1 parent ea465d8 commit c5b56ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

beginner_source/transformer_tutorial.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ def forward(self, x: Tensor) -> Tensor:
148148
# Given a 1-D vector of sequential data, ``batchify()`` arranges the data
149149
# into ``batch_size`` columns. If the data does not divide evenly into
150150
# ``batch_size`` columns, then the data is trimmed to fit. For instance, with
151-
# the alphabet as the data (total length of 26) and a batch size of 4,
152-
# we would divide the alphabet into sequences of length 6, resulting in 4 such sequences:
151+
# the alphabet as the data (total length of 26) and `batch_size=4`, we would
152+
# divide the alphabet into sequences of length 6, resulting in 4 such sequences:
153153
#
154154
# .. math::
155155
# \begin{bmatrix}

0 commit comments

Comments
 (0)