Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 011ae8a

Browse files
fix typo (#1652)
Co-authored-by: Holly Sweeney <[email protected]>
1 parent a8db85b commit 011ae8a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

prototype_source/vmap_recipe.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@
2727
# that runs on examples and then lift it to a function that can
2828
# take batches of examples with `vmap(func)`. `func` however
2929
# is subject to many restrictions:
30+
#
3031
# - it must be functional (one cannot mutate a Python data structure
31-
# inside of it), with teh exception of in-place PyTorch operations.
32+
# inside of it), with the exception of in-place PyTorch operations.
3233
# - batches of examples must be provided as Tensors. This means that
3334
# vmap doesn't handle variable-length sequences out of the box.
3435
#
@@ -67,6 +68,7 @@ def model(feature_vec):
6768
# `vmap` can also help vectorize computations that were previously difficult
6869
# or impossible to batch. This bring us to our second use case: batched
6970
# gradient computation.
71+
#
7072
# - https://github.com/pytorch/pytorch/issues/8304
7173
# - https://github.com/pytorch/pytorch/issues/23475
7274
#

0 commit comments

Comments
 (0)