Repository navigation
[AutoDiff] [stdlib] Deprecate 'CotangentVector' in favor of 'TangentVector'. - #24825
Merged
Merged
Conversation
Contributor
Author
|
@swift-ci please test tensorflow |
rxwei
commented
May 16, 2019
dan-zheng
approved these changes
May 16, 2019
dan-zheng
left a comment
Contributor
There was a problem hiding this comment.
Exciting simplification!
I skimmed the files, LGTM if tests pass.
Contributor
Author
|
@swift-ci please clean test tensorflow Linux |
Contributor
Author
|
All tests pass locally, but CI seems dead. |
Contributor
|
How about alternative names for I feel cc @marcrasi |
|
I like the idea of changing it to something more familiar. Ideas:
|
Contributor
|
+1 to |
rxwei
pushed a commit
to tensorflow/swift-apis
that referenced
this pull request
May 16, 2019
This PR is parallel to the following [change](swiftlang/swift#24825) which deprecated `Cotangent` and removed the `tangentVector(from:`) method.
bartchr808
added a commit
to bartchr808/swift
that referenced
this pull request
May 16, 2019
rxwei
added a commit
to rxwei/swift
that referenced
this pull request
Aug 25, 2019
`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.
rxwei
added a commit
that referenced
this pull request
Aug 25, 2019
`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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.