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

Fix bug in batchGathering #767

Merged
merged 1 commit into from
Mar 25, 2020
Merged

Fix bug in batchGathering #767

merged 1 commit into from
Mar 25, 2020

Conversation

saeta
Copy link
Contributor

@saeta saeta commented Mar 21, 2020

Previously, if batchGathering was operating upon a batch of data, it would get
stuck during the final reshape, due to using the wrong input tensor shape. This
change fixes that and includes a test case that caught the bug before the fix was
applied.

Test Case '-[TensorFlowTests.BasicOperatorTests testBatchGatheringAcrossBatch]' started.
Fatal error: Input to reshape is a tensor with 6 values, but the requested shape has 3: file /Users/saeta/src/swift-apis/Sources/TensorFlow/Bindings/EagerExecution.swift, line 301
Exited with signal code 4

Previously, if `batchGathering` was operating upon a batch of data, it would get
stuck during the final reshape, due to using the wrong input tensor shape. This
change fixes that and includes a test case that caught the bug before the fix was
applied.

```
Test Case '-[TensorFlowTests.BasicOperatorTests testBatchGatheringAcrossBatch]' started.
Fatal error: Input to reshape is a tensor with 6 values, but the requested shape has 3: file /Users/saeta/src/swift-apis/Sources/TensorFlow/Bindings/EagerExecution.swift, line 301
Exited with signal code 4
```
@saeta
Copy link
Contributor Author

saeta commented Mar 21, 2020

PTAL @eaplatanios

@saeta
Copy link
Contributor Author

saeta commented Mar 21, 2020

Note: this unblocks tensorflow/swift-models#344

@dabrahams dabrahams merged commit b6bd14f into master Mar 25, 2020
@saeta saeta deleted the batch-gather branch March 25, 2020 17:09
@eaplatanios
Copy link
Contributor

Sorry @saeta didn't manage to take a look into this earlier because these days are kind of crazy. The fix looks good to me!

@saeta
Copy link
Contributor Author

saeta commented Mar 25, 2020

hehe, no worries, thanks @eaplatanios !!

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.

3 participants