Skip to content

Commit bf20ff1

Browse files
committed
get_tensor_value() returns a list
1 parent 1dffcf5 commit bf20ff1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tf2onnx/onnx_opset/tensor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,7 @@ def version_7(cls, ctx, node, **kwargs):
607607
if dim_node.is_const():
608608
node.type = "Unsqueeze"
609609
dim = dim_node.get_tensor_value()
610+
dim = dim[0]
610611
if dim < 0:
611612
input_rank = len(ctx.get_shape(node.input[0]))
612613
dim = dim + input_rank + 1

0 commit comments

Comments
 (0)