eaplatanios / tensorflow_scala

TensorFlow API for the Scala Programming Language
http://platanios.org/tensorflow_scala/
Apache License 2.0
936 stars 95 forks source link

Cannot find graph collection key named 'variables' #99

Closed lucataglia closed 5 years ago

lucataglia commented 6 years ago

During the operation of restoring the graph the tf.createWith(graph = Graph()) fail because inside Graph.scala at the line 669 in the foreach he try to restore variables but Graph.Keys contains only UNBOUND_INPUTS.

I found out also that if I did the init of the session before the parse of the meta graph it works: This works

tf.createWith(graph = Graph()) {
      val session = Session()
      val saver = tf.Saver.fromMetaGraphDef(metaGraphDef = mgf)

This doesn't

tf.createWith(graph = Graph()) {
      val saver = tf.Saver.fromMetaGraphDef(metaGraphDef = mgf)
      val session = Session()

Is it possible that is something about how the implicit inside api/package.scala were computed ?

eaplatanios commented 6 years ago

That is an interesting bug. Thanks for digging into it. I'll look at it later today. I think I know what's causing the problem.

eaplatanios commented 6 years ago

@lucataglia Sorry for not getting back to you about this. Does it still happen with 0.3.0-SNAPSHOT?

lucataglia commented 6 years ago

@eaplatanios Hi Anthony, I'll let you know as soon as I can since I'm working on another project in these weeks. By the way I keep you update.

eaplatanios commented 5 years ago

Closing due to inactivity. Will re-open if the issue persists.