Esempio n. 1
0
        /// <summary>
        /// Return a new execution session with the associated graph.
        /// </summary>
        /// <param name="graph">Graph must be a valid graph (not deleted or null).  This function will
        /// prevent the graph from being deleted until Session is deleted.
        /// Does not take ownership of opts.
        /// </param>
        /// <param name="sessionOptions">The session options</param>
        /// <param name="status">The status</param>
        public Session(Graph graph, SessionOptions sessionOptions = null, Status status = null)
        {
            _graph = graph;

            using (StatusChecker checker = new StatusChecker(status))
                _ptr = TfInvoke.tfeNewSession(graph, sessionOptions, checker.Status);
        }