Default: False.
Returns:
      Returns a "(output, vjp_fn)" tuple containing the output of
      "func" applied to "primals" and a function that computes the vjp
      of "func" with respect to all "primals" using the cotangents
      passed to the returned function. If "has_aux is True", then
      instead returns a "(output, vjp_fn, aux)" tuple. The returned
      "vjp_fn" function will return a tuple of each VJP.
When used in simple cases, "vjp()" behaves the same as "grad()"



x = torch.randn([5])
f = lambda x: x.sin().sum()
(_, vjpfunc) = torch.func.vjp(f, x)
grad = vjpfunc(torch.tensor(1.))[0]
assert torch.allclose(grad, torch.func.grad(f)(x))



However, "vjp()" can support functions with multiple outputs by
   passing in the cotangents for each of the outputs



x = torch.randn([5])
f = lambda x: (x.sin(), x.cos())
(_, vjpfunc) = torch.func.vjp(f, x)
vjps = vjpfunc((torch.ones([5]), torch.ones([5])))


