Skip to content

Commit d9ea76a

Browse files
committed
Merge branch 'cast3' of https://github.com/xadupre/tensorflow-onnx into input2
2 parents 74321f3 + d972ace commit d9ea76a

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
@@ -401,8 +401,8 @@ def maybe_cast_input(self, supported, type_map):
401401
if tdtype is None:
402402
raise RuntimeError("don't know how to cast type {} on node {}".format(dtype, name))
403403
shape = self.graph.get_shape(name)
404-
cast_node = self.graph.insert_new_node_on_input(self, "Cast", name)
405-
cast_node.set_attr("to", tdtype)
404+
cast_node = self.graph.insert_new_node_on_input(
405+
self, "Cast", name, to=tdtype)
406406
self.graph.set_dtype(cast_node.output[0], [tdtype])
407407
self.graph.set_shape(cast_node.output[0], shape)
408408
did_cast = True

0 commit comments

Comments
 (0)