-
-
Notifications
You must be signed in to change notification settings - Fork 13
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 clamptype
mechanism, to project into cotangent space
#16
Conversation
I generally really like this, but I wonder whether there's a better name availlable. This is a bit verbose, but something like My other question is whether there are any situations in which type information is insufficient to make this work? For example, to know how to clamp a On a separate note, what are the considerations regarding doing this here rather than in |
Done, thanks! Could delete this. |
clamptype
mechanism, to project onto to tangent spaceclamptype
mechanism, to project into cotangent space
This adds a mechanism to constrain tangents based on the type of the input. The initial goal is ensuring that real numbers do not accidentally acquire complex gradients, and that some LinearAlgebra structured arrays are preserved.
Edit -- the bulk of the implementation is now at FluxML/Zygote.jl#965, this is just a stub. (Which ought to be non-breaking.) I've moved discussion there.