Skip to content

Commit

Permalink
[95] Properly adds the shapes of the tensors to the graph. (#98)
Browse files Browse the repository at this point in the history
* support for strings

* removing type tags, they do not work with scala 2.10

* removing type tags, they do not work with scala 2.10

* removing type tags, they do not work with scala 2.10

* revert scala changes

* revert scala changes

* revert scala changes
  • Loading branch information
thunterdb authored Apr 24, 2017
1 parent b393bf3 commit 78d2d59
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/python/tensorframes/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def _add_graph(graph, builder, use_file=True):
fname = d + "/proto.pb"
builder.graphFromFile(fname)
else:
gser = graph.as_graph_def().SerializeToString()
# Make sure that TF adds the shapes.
gser = graph.as_graph_def(add_shapes=True).SerializeToString()
gbytes = bytearray(gser)
builder.graph(gbytes)

Expand All @@ -55,7 +56,7 @@ def _add_shapes(graph, builder, fetches):
# dimensions are unknown
ph_names = []
ph_shapes = []
for n in graph.as_graph_def().node:
for n in graph.as_graph_def(add_shapes=True).node:
# Just the input nodes:
if not n.input:
op_name = n.name
Expand Down

0 comments on commit 78d2d59

Please sign in to comment.