Skip to content
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

[TF] Fix `Tensor.replacing(_:_:)` wrong semantics. #24635

Merged
merged 1 commit into from May 18, 2019

Conversation

Projects
None yet
3 participants
@artste
Copy link

commented May 9, 2019

Swapped self and other. Now values will be replaced if mask is true.

References:
https://bugs.swift.org/browse/TF-492
https://forums.fast.ai/t/tensor-replacing-with-replacing-on-false/45507

[TF] Fix `Tensor.replacing(_:_:)` wrong semantics.
Swapped `self` and `other`. Now values will be replaced if mask is `true`.

@dan-zheng dan-zheng requested review from dan-zheng and rxwei and removed request for dan-zheng May 9, 2019

@dan-zheng
Copy link
Collaborator

left a comment

Thank you! Could you please add a test to test/TensorFlowRuntime/tensor.swift?

@dan-zheng dan-zheng added the tensorflow label May 9, 2019

@rxwei

This comment has been minimized.

Copy link
Collaborator

commented May 18, 2019

@swift-ci please test tensorflow

@rxwei

This comment has been minimized.

Copy link
Collaborator

commented May 18, 2019

Merging to fix wrong semantics.

@rxwei rxwei merged commit 8472823 into apple:tensorflow May 18, 2019

2 of 3 checks passed

Swift Test macOS Platform (TensorFlow) Build started.
Details
Swift Test Linux Platform (TensorFlow) Build finished. 12057 tests run, 10860 skipped, 0 failed.
Details
Swift Test Linux Platform with GPU (TensorFlow) Build finished. 12057 tests run, 10860 skipped, 0 failed.
Details

artste added a commit to artste/swift that referenced this pull request May 27, 2019

[TF] Added unit test to test `Tensor.replacing(with,where)` (apple#24635
)

Added a unit test to test Tensor.replacing functionality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.