tf.Session.__init__(target='', graph=None, config=None)
Creates a new TensorFlow session.
If no graph
argument is specified when constructing the session, the default graph will be launched in the session. If you are using more than one graph (created with tf.Graph()
in the same process, you will have to use different sessions for each graph, but each graph can be used in multiple sessions. In this case, it is often clearer to pass the graph to be launched explicitly to the session constructor.
Args:
-
target
: (Optional.) The execution engine to connect to. Defaults to using an in-process engine. See Distributed Tensorflow for more examples. -
graph
: (Optional.) TheGraph
to be launched (described above). -
config
: (Optional.) AConfigProto
protocol buffer with configuration options for the session.
Please login to continue.