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

Fix input rank unknown issue for resize op #1062

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
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
7 changes: 4 additions & 3 deletions onnx_tf/handlers/backend/resize.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ def args_check(cls, node, **kwargs):
cls.roi_cast_map[tf.float64] = tf.float32 if sys_config.auto_cast else None

x = kwargs["tensor_dict"][node.inputs[0]]
x_shape = x.get_shape().as_list()
if x.get_shape().rank is not None:
x_shape = x.get_shape().as_list()
if len(x_shape) != 4:
exception.OP_UNSUPPORTED_EXCEPT("Resize required 4D input", "Tensorflow")
x_dtype = x.dtype
if len(x_shape) != 4:
exception.OP_UNSUPPORTED_EXCEPT("Resize required 4D input", "Tensorflow")
if x_dtype in cls.x_cast_map and cls.x_cast_map[x_dtype] is None:
exception.DTYPE_NOT_CAST_EXCEPT(
"Resize input " + node.inputs[0] + " with data type '" +
Expand Down