Skip to content
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

tangent * tangent and dot(tangent, tangent) can return tangents. #643

Open
lukas-weber opened this issue Dec 15, 2023 · 0 comments
Open
Labels
breaking a breaking change

Comments

@lukas-weber
Copy link
Contributor

I noticed that there are methods of * and dot for the AbstractZero types that work like

Base.:*(::NoTangent, ::NoTangent) = NoTangent()
LinearAlgebra.dot(::NoTangent, ::ZeroTangent) = ZeroTangent()

However, if both arguments are tangents,

  1. * should not be defined.
  2. dot should return a real number, not another tangent.

In my understanding, code that relies on such nonlinear tangent to tangent operations cannot be correct, so it may be worthwhile to remove such methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking a breaking change
Projects
None yet
Development

No branches or pull requests

2 participants