We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38eb9f4 commit 66a05dcCopy full SHA for 66a05dc
README.md
@@ -180,7 +180,7 @@ computes vjps given some `cotangents` Tensors.
180
>>> from functorch import jacrev
181
>>> x = torch.randn(5)
182
>>> jacobian = jacrev(torch.sin)(x)
183
->>> expected = torch.diag(x)
+>>> expected = torch.diag(torch.cos(x))
184
>>> assert torch.allclose(jacobian, expected)
185
```
186
Use `jacrev` to compute the jacobian. This can be composed with vmap to produce
0 commit comments