-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
withgradient
and gradient
are incoherent for scalar input
#165
Comments
Yes, as documented but a potential surprise:
|
Okay thanks. The behavior is the same for scalar floats btw, but now I understand why. julia> Tracker.gradient(abs2, 3.)
(6.0 (tracked),)
julia> Tracker.withgradient(abs2, 3.)
(val = 9.0, grad = (nothing,)) |
Yea I don't know that this is ideal, nor ideally documented. Possibly it's a reason for Flux to own this function. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: