-
Notifications
You must be signed in to change notification settings - Fork 65
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
Add shortcut to find out if an AbstractArray is differentiable #784
Conversation
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.
It really looks good to me, but I would really much prefer having this property be named requires_grad
, because that's how we use it in all our tests. However, if having is_differentiable
is needed to improve the user experience, I suggest we have two properties requires_grad
and is_differentiable
, with is_differentiable
simply returning requires_grad
.
Our tests were written with |
As I said above, I think we can have two properties. I am just saying that having a property |
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.
LGTM ! Thanks :)
db3981a
to
8d5a5d2
Compare
AbstractArray.is_differentiable
, which checks if the stored array is a tensor withrequires_grad=True