Closed Spiess closed 5 years ago
You just use:
val newGraph = tf.Graph()
tf.createWith(graph = newGraph) {
// Put everything that needs to go in newGraph here.
}
Perfect, thank you, this is exactly what I need!
And just in case someone else looking for the same thing finds this issue: tf.Graph()
doesn't work for me, but just Graph()
does.
In Python TensorFlow there are graph management functions to be able to reset and switch graphs around to allow using multiple different graphs within the same process. I haven't been able to find these functions in TensorFlow Scala and assume that they are not yet implemented.
The specific functions I am missing are
tf.reset_default_graph
andtf.Graph.as_default
.Are these already implemented in TensorFlow Scala and I've just missed them? Or would it be possible to implement them in TensorFlow Scala?