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

Make maybe_set_static_shape a no-op when shape is a python constant. #31673

Merged
merged 1 commit into from
Aug 16, 2019

Conversation

saxenasaurabh
Copy link
Member

maybe_set_static_shape is only meant to handle cases that C++ shape inference cannot, which is when shape is a tensor that has a path to a captured placeholder inside a FuncGraph. So this change does not break any use-cases we care about.
This fixes an issue with creating spurious constants in the Graph which are unused after shape inference.

PiperOrigin-RevId: 263666943

`maybe_set_static_shape` is only meant to handle cases that C++ shape inference cannot, which is when shape is a tensor that has a path to a captured placeholder inside a FuncGraph. So this change does not break any use-cases we care about.
This fixes an issue with creating spurious constants in the Graph which are unused after shape inference.

PiperOrigin-RevId: 263666943
@tensorflow-bot tensorflow-bot bot added the size:M CL Change Size: Medium label Aug 16, 2019
@goldiegadde goldiegadde self-assigned this Aug 16, 2019
@goldiegadde goldiegadde merged commit 4756cfb into tensorflow:r2.0 Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes size:M CL Change Size: Medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants