TensorFlow.jl - Export/Import Meta Graph?

Hi experts

i am struggling with exporting and importing a meta_graph in TensorFlow.jl:

tensorflow 1.4.0
TensorFlow.jl 0.8.0
julia 0.6.2

Here an example,. where i am struggling:

using TensorFlow
session = Session(Graph())
x = placeholder(Float32)
@tf W=get_variable([2,2],Float32)
test= x*W
train.export_meta_graph("test.meta")

when i am trying to import the meta graph in a new session like:

using TensorFlow
session = Session(Graph())
train.import_meta_graph("test.meta")

i get following error:

ERROR: Tensorflow error: Status: Shape must be rank 2 but is rank 0 for 'test' (op: 'MatMul') with input shapes: [], [2,2].

i tried different variations, like providing a shape=[-1,2] to the placeholder variable, but it doesnt help.

doing the same but w/o the “test = x*W” part works, so it seems that during the import step the shapes for the matmul are not defined (for x), even if provided.

Maybe someone can point me to my mistake here…

Thanks a lot in advance

best Daniel

facing the same problem, did you found a solution?
Best, Menahem Pirchi

Hi experts

i am struggling with exporting and importing a meta_graph in TensorFlow.jl:

tensorflow 1.4.0

TensorFlow.jl 0.8.0

julia 0.6.2

Here an example,. where i am struggling:

using TensorFlow
session = Session(Graph())
x = placeholder(Float32)
@tf W=get_variable([2,2],Float32)
test= x*W
train.export_meta_graph("test.meta")

when i am trying to import the meta graph in a new session like:

using TensorFlow
session = Session(Graph())
train.import_meta_graph("test.meta")

i get following error:

ERROR: Tensorflow error: Status: Shape must be rank 2 but is rank 0 for 'test' (op: 'MatMul') with input shapes: [], [2,2].

i tried different variations, like providing a shape=[-1,2] to the placeholder variable, but it doesnt help.

doing the same but w/o the test = x*W part works, so it seems that during the import step the shapes for the matmul are not defined (for x), even if provided.

Maybe someone can point me to my mistake here…

Thanks a lot in advance
Menahem Pirchi