Skip to content

Conversation

@sgugger
Copy link

@sgugger sgugger commented Apr 20, 2019

As discussed in #24164, this PR adds functionality for Tensor.expandingShape, make it support [Int] or Int... (like its counterpart Tensor.squeezingShape).

I also added a test for both those functions (none were directly tested), and the gradient test is passing.

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.

Thanks Sylvain!

We are in the process of moving all Tensor APIs out of the compiler repo into the deep learning library (tensorflow/swift-apis#70). That will make it easier and faster to develop and test!

@rxwei
Copy link
Contributor

rxwei commented Apr 20, 2019

@swift-ci please test tensorflow

@rxwei rxwei added the tensorflow This is for "tensorflow" branch PRs. label Apr 20, 2019
@rxwei rxwei merged commit dc6415e into swiftlang:tensorflow Apr 21, 2019
@sgugger
Copy link
Author

sgugger commented Apr 21, 2019

Had missed that, will make new PRs there directly.
Now that this is done I'll make one to refactor the gradients of mean/sum with squeezeingShape.

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