Skip to content

Commit 772f841

Browse files
committed
revert cast
1 parent 1c6124e commit 772f841

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tf2onnx/graph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,8 @@ def maybe_cast_input(self, supported, type_map):
396396
if tdtype is None:
397397
raise RuntimeError("don't know how to cast type {} on node {}".format(dtype, name))
398398
shape = self.graph.get_shape(name)
399-
cast_node = self.graph.insert_new_node_on_input(
400-
self, "Cast", name, to=tdtype)
399+
cast_node = self.graph.insert_new_node_on_input(self, "Cast", name)
400+
cast_node.set_attr("to", tdtype)
401401
self.graph.set_dtype(cast_node.output[0], [tdtype])
402402
self.graph.set_shape(cast_node.output[0], shape)
403403
did_cast = True

0 commit comments

Comments
 (0)