-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong JVP and VJP ? #60
Comments
Yes, it's a bug. The vjps terms has space for all the variables in the function, not just the variables you are differentiating with respect to, in this case uvs. Same thing for the vvs, term it has space for all the variables in the functions. I'll fix it today. |
I have a fix on branch brianguenter/issue60. Could you download this branch and run it on your code to verify that it is giving the results you expect? If you have any other code that exercises jacobian_times_v and jacobian_transpose_v could you run that as well and report any bugs to me? |
Fixes #60 These two functions used the wrong dimensions to determine the size of the result vector. This should fix this problem. Wrote tests to verify the the functions jacobian_transpose_v numerically matches transpose(J)*v and jacobian_times_v numerically matches J*v.
Since I haven't heard from you will assume you are no longer having problems. I'm closing the issue. |
Sorry for the late response. Thanks a lot for your work and for this library ! It seems to be working perfectly. |
Hi,
I am trying to compute VJPs and JVPs for a simple heat equation, but it seems unless I am missing something, the output shapes are inconsistent :
The jacobian seems correct but not the vjps and jvps.
The text was updated successfully, but these errors were encountered: