You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
switch usage of torch.autograd.functional.vjp to torch.autograd.grad (30% faster)
They give the same numeric result, but torch.autograd.grad is a more standard usage, and performance is better for this use case.
torch.autograd.functional.vjp is unnecessary because there's no custom input to the pullback, and it was implicitly calling the pullback with the normal unit vector, which is exactly what torch.autograd.grad does anyway
0 commit comments