-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[AutoDiff] [stdlib] Deprecate 'CotangentVector' in favor of 'TangentVector'. #24825
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
CotangentVector
associated type and make it equal toTangentVector
.Mathematically, types conforming to the
Differentiable
protocol 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) -> Scalar
cannot conform toAdditiveArithmetic
).__Differentiable
,_Differentiable
, andDifferentiable
.TangentVector
andCotangentVector
makes user-defined conformances complicated.Changes include:
associatedtype CotangentVector
fromDifferentiable
.typealias CotangentVector = TangentVector
inDifferentiable
with a deprecation message.__Differentiable
and_Differentiable
back intoDifferentiable
.Defines away TF-213.