Skip to content

Commit 3b299d6

Browse files
yupbankthunterdb
authored andcommitted
Skip operation have no input and no output (#145)
like `tf.tables_initializer()` which is being used in `savedModel`
1 parent 4531eb6 commit 3b299d6

File tree

1 file changed

+2
-2
lines changed
  • src/main/python/tensorframes

1 file changed

+2
-2
lines changed

src/main/python/tensorframes/core.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ def _add_shapes(graph, builder, fetches):
7777
ph_names = []
7878
ph_shapes = []
7979
for n in graph.as_graph_def(add_shapes=True).node:
80-
# Just the input nodes:
81-
if not n.input:
80+
# Just the input nodes which have output:
81+
if not n.input and n.attr:
8282
op_name = n.name
8383
# Simply get the default output for now, assume that the nodes have only one output
8484
t = graph.get_tensor_by_name(op_name + ":0")

0 commit comments

Comments
 (0)