Skip to content

Commit 98c3567

Browse files
Fix Conv for unknown input rank (#1524)
Signed-off-by: Tom Wildenhain <[email protected]>
1 parent b28aed1 commit 98c3567

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tf2onnx/onnx_opset/nn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ def any_version(cls, opset, ctx, node, **kwargs):
349349

350350
# prefix with batch dim of [1] to satisfy rank requirements
351351
input_shape = ctx.get_shape(node.input[0])
352-
if len(input_shape) == spatial + 1:
352+
if input_shape is not None and len(input_shape) == spatial + 1:
353353
gb = GraphBuilder(ctx)
354354
usq_node = gb.make_unsqueeze({"axes": [0], 'data': node.input[0]}, return_node=True)
355355
ctx.replace_inputs(node, [usq_node.output[0]] + node.input[1:])

0 commit comments

Comments
 (0)