Skip to content

Conversation

@dan-zheng
Copy link
Contributor

A step towards machine learning optimizer revamp.

The next step is to make Tensor.VectorSpaceScalar = Float.
This makes Tensor scalar multiplication always work with Float
instead of Scalar.

Renaming VectorProtocol.Scalar is necessary. Otherwise, Scalar
is ambiguous within Tensor's type context: it may refer to either:

  • The witness type of VectorProtocol.Scalar, or
  • The Scalar generic parameter.

A step towards machine learning optimizer revamp.

The next step is to make `Tensor.VectorSpaceScalar = Float`.
This makes `Tensor` scalar multiplication always work with `Float`
instead of `Scalar`.

Renaming `VectorProtocol.Scalar` is necessary. Otherwise, `Scalar`
is ambiguous within `Tensor`'s type context: it may refer to either:
- The witness type of `VectorProtocol.Scalar`, or
- The `Scalar` generic parameter.
@dan-zheng
Copy link
Contributor Author

@swift-ci Please clean test tensorflow

Copy link
Contributor

@rxwei rxwei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

I'll add that while the new name is subject to debate, VectorSpaceScalar is by far the most descriptive, mathematically accurate, and Google-able name we've found by far.

@rxwei
Copy link
Contributor

rxwei commented Jun 12, 2019

@swift-ci please clean test tensorflow

@rxwei
Copy link
Contributor

rxwei commented Jun 12, 2019

Verified that all tests pass locally. swift build works with tensorflow/swift-apis.

@rxwei rxwei merged commit 1cd4b0a into swiftlang:tensorflow Jun 12, 2019
@rxwei rxwei deleted the rename-vector-protocol-scalar branch June 12, 2019 04:01
dan-zheng added a commit to dan-zheng/swift that referenced this pull request Jun 12, 2019
rxwei pushed a commit that referenced this pull request Jun 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tensorflow This is for "tensorflow" branch PRs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants