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

[Frontend][Tensorflow] Fix TF 1.15 conv2d_transpose parsing #6589

Merged
merged 2 commits into from
Oct 11, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions python/tvm/relay/frontend/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,11 @@ def _impl(inputs, attr, params, mod):
)
attr["data_format"] = "NCHW"

if opname == "conv_transpose" and len(attr["_output_shapes"]) > 0:
if (
jtuyls marked this conversation as resolved.
Show resolved Hide resolved
opname == "conv_transpose"
and len(attr["_output_shapes"]) > 0
and attr["_output_shapes"][0]
):
tmp_shape = attr["_output_shapes"][0]
tmp_shape = [tmp_shape[ii] for ii in (0, 3, 1, 2)]
attr["_output_shapes"][0] = tmp_shape
Expand Down Expand Up @@ -385,7 +389,11 @@ def _impl(inputs, attr, params, mod):
kernel_h, kernel_w = attr["kernel_shape"]

pdata_shape = input_shape
if opname == "conv_transpose" and len(attr["_output_shapes"]) > 0:
if (
opname == "conv_transpose"
and len(attr["_output_shapes"]) > 0
and attr["_output_shapes"][0]
):
pdata_shape = attr["_output_shapes"][0]

if attr["data_format"] == "NHWC":
Expand Down