File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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#
You can’t perform that action at this time.
0 commit comments