-
Notifications
You must be signed in to change notification settings - Fork 21
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
Hook up requires_grad
#288
Conversation
Static analysis CI error will be fixed by #287. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jwallwork23 Generally seems sensible to me.
Main request is to test the defaults for requires_grad, not just the true
setting.
I realise this probably needs a bit of tweaking/rebasing after a few of the recent changes.
660fae9
to
6b6a874
Compare
[Rebased on top of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jwallwork23 an even better fix than I imagined.
Hopefully fixtures should come in useful as we expand things.
Thanks for the review @jatkinson1000! |
Towards #158.
(Refined from #286.)
This PR hooks the
requires_grad
option up properly and provides atorch_tensor_requires_grad
function (as well as atorch_tensor%requires_grad
method) to query this. Unit tests are written and the option is also used in the autograd example.