Skip to content

Commit

Permalink
fix tensorflow relay converter for conv3d_transpose op
Browse files Browse the repository at this point in the history
  • Loading branch information
rebel-jangys committed Mar 23, 2023
1 parent c16a59d commit 3b1c52a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/tvm/relay/frontend/tensorflow_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,10 @@ def _impl(inputs, attr, params, mod):
raise tvm.error.OpAttributeInvalid(msg.format(attr["padding"]))

if "kernel_layout" not in attr:
attr["kernel_layout"] = "DHWIO" if attr["data_format"] == "NDHWC" else "OIDHW"
if opname == "conv":
attr["kernel_layout"] = "DHWIO" if attr["data_format"] == "NDHWC" else "OIDHW"
elif opname == "conv_transpose":
attr["kernel_layout"] = "DHWOI" if attr["data_format"] == "NDHWC" else "IODHW"

use_bias = len(inputs) == (3 if opname != "conv_transpose" else 4)
channel_axis = 1 if attr["data_format"] == "NCDHW" else 4
Expand Down

0 comments on commit 3b1c52a

Please sign in to comment.