Skip to content

Commit 167921f

Browse files
committed
Fix more typos
1 parent 9d5c022 commit 167921f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

intermediate_source/named_tensor_tutorial.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,15 @@ def catch_error(fn):
193193
#
194194
# This results in named tensors preventing unintended alignment during
195195
# operations that broadcast. Without ``names``, ``per_batch_scale`` would be
196-
# aligned with the last dimension of ``imgs``, which is what we intended.
196+
# aligned with the last dimension of ``imgs``, which is not what we intended.
197197

198198
imgs = torch.randn(2, 2, 2, 2, names=('N', 'C', 'H', 'W'))
199199
per_batch_scale = torch.rand(2, names=('N',))
200200
catch_error(lambda: imgs * per_batch_scale)
201201

202202
######################################################################
203-
# However, we really wanted to perform the operation by aligning
204-
# ``per_batch_scale`` with the batch dimension of ``imgs``.
203+
# We really wanted to perform the operation by aligning ``per_batch_scale``
204+
# with the batch dimension of ``imgs``.
205205
# See the new explicit broadcasting by names functionality for how to
206206
# align tensors by name, covered below.
207207
#

0 commit comments

Comments
 (0)