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

Use static tensor shapes if possible for one-padding #463

Merged
merged 2 commits into from
Mar 24, 2020

Conversation

lgeiger
Copy link
Member

@lgeiger lgeiger commented Mar 24, 2020

In general the batch dimension is undefined. This means that tf.pad doesn't correctly set the shapes of the tensor. This makes model summary fail since the TensorShape is not correctly inferred.

This PR uses static shapes whenever the spatial dimensions are fully defined to avoid this problem.

@lgeiger lgeiger added the bug Something isn't working label Mar 24, 2020
@lgeiger lgeiger requested a review from a team March 24, 2020 12:31
@lgeiger
Copy link
Member Author

lgeiger commented Mar 24, 2020

Not sure why codecov doesn't like this, the test should fully cover the changes.

@AdamHillier
Copy link
Contributor

Perhaps we should add an example with 1-padding to the model summary snapshot tests to detect this in the future?

@AdamHillier AdamHillier merged commit da595ef into master Mar 24, 2020
@AdamHillier AdamHillier deleted the use-static-shapes branch March 24, 2020 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants