Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Added support for negative 'axis' argument values to 'Tensor.unstacked(alongAxis:)'. #351

Merged
merged 4 commits into from
Aug 9, 2019

Conversation

eaplatanios
Copy link
Contributor

Without this fix the gradients of Tensor.init(stacking:alongAxis:) are wrong when axis is negative. It also makes it consistent with other functions that take in axis arguments.

Copy link
Member

@dan-zheng dan-zheng left a comment

Choose a reason for hiding this comment

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

Could you please add tests to Tests/TensorFlowTests/TensorAutoDiffTests.swift?

@eaplatanios
Copy link
Contributor Author

@dan-zheng I added a test as you requested, but it currently causes a compiler crash that is irrelevant to this PR. I filed TF-653 to track it.

@eaplatanios
Copy link
Contributor Author

@rxwei I commented out the failing test and added a TODO related to TF-653. Could we merge this in the meantime since it corrects some unexpected behavior for Tensor.unstacked(alongAxis:)?

@rxwei
Copy link
Contributor

rxwei commented Aug 9, 2019

SGTM

@eaplatanios eaplatanios merged commit cc36830 into tensorflow:master Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants