Skip to content
Merged
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
2 changes: 1 addition & 1 deletion tf2onnx/onnx_opset/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ def any_version_after10(cls, opset, ctx, node, **kwargs):
# cast X if needed
if dtypes[0] != onnx_pb.TensorProto.FLOAT:
# opset-10 supports types other than float but onnxruntime does not
ctx.insert_new_node_on_output("Cast", node.input[0], to=onnx_pb.TensorProto.FLOAT)
ctx.insert_new_node_on_input(node, "Cast", node.input[0], input_index=0, to=onnx_pb.TensorProto.FLOAT)
ctx.insert_new_node_on_output("Cast", node.output[0], to=dtypes[0])
# cast the index output to int32
cast_out = ctx.insert_new_node_on_output("Cast", node.output[1], name=utils.make_name(node.name), to=dtypes[1])
Expand Down