-
Couldn't load subscription status.
- Fork 10.6k
[AutoDiff] [stdlib] Deprecate 'CotangentVector' in favor of 'TangentVector'. #24825
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
Conversation
|
@swift-ci please test tensorflow |
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.
Exciting simplification!
I skimmed the files, LGTM if tests pass.
|
@swift-ci please clean test tensorflow Linux |
|
All tests pass locally, but CI seems dead. |
|
How about alternative names for I feel cc @marcrasi |
|
I like the idea of changing it to something more familiar. Ideas:
|
|
+1 to |
This PR is parallel to the following [change](swiftlang/swift#24825) which deprecated `Cotangent` and removed the `tangentVector(from:`) method.
`CotangentVector` was deprecated in swiftlang#24825 and the deprecation was released as part of Swift for TensorFlow v0.4. Now it's time to remove it.
`CotangentVector` was deprecated in #24825 and the deprecation was released as part of Swift for TensorFlow v0.4. Now it's time to remove it.
This PR removes the
CotangentVectorassociated type and make it equal toTangentVector.Mathematically, types conforming to the
Differentiableprotocol represent a Riemannian manifold, whose metric is inner products, which provide an isomorphism between a tangent space and a cotangent space at a point.Some theoretical and practical reasons:
(TangentVector) -> Scalarcannot conform toAdditiveArithmetic).__Differentiable,_Differentiable, andDifferentiable.TangentVectorandCotangentVectormakes user-defined conformances complicated.Changes include:
associatedtype CotangentVectorfromDifferentiable.typealias CotangentVector = TangentVectorinDifferentiablewith a deprecation message.__Differentiableand_Differentiableback intoDifferentiable.Defines away TF-213.