<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"/><title>TensorFlow.Session</title><linkhref="ocean.css"rel="stylesheet"type="text/css"title="Ocean"/><scriptsrc="haddock-util.js"type="text/javascript"></script><scripttype="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_TensorFlow-Session.html");};
</script></head><body><divid="package-header"><ulclass="links"id="page-menu"><li><ahref="src/TensorFlow-Session.html">Source</a></li><li><ahref="index.html">Contents</a></li><li><ahref="doc-index.html">Index</a></li></ul><pclass="caption">tensorflow-0.1.0.0: TensorFlow bindings.</p></div><divid="content"><divid="module-header"><tableclass="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><pclass="caption">TensorFlow.Session</p></div><divid="synopsis"><pid="control.syn"class="caption expander"onclick="toggleSection('syn')">Synopsis</p><ulid="section.syn"class="hide"onclick="toggleSection('syn')"><liclass="src short"><spanclass="keyword">data</span><ahref="#t:Session">Session</a> a</li><liclass="src short"><spanclass="keyword">data</span><ahref="#t:Options">Options</a></li><liclass="src short"><ahref="#v:sessionConfig">sessionConfig</a> :: <ahref="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a><ahref="TensorFlow-Session.html#t:Options">Options</a><ahref="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Protobuf-Config.html#t:ConfigProto">ConfigProto</a></li><liclass="src short"><ahref="#v:sessionTarget">sessionTarget</a> :: <ahref="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a><ahref="TensorFlow-Session.html#t:Options">Options</a><ahref="../bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></li><liclass="src short"><ahref="#v:sessionTracer">sessionTracer</a> :: <ahref="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a><ahref="TensorFlow-Session.html#t:Options">Options</a> Tracer</li><liclass="src short"><ahref="#v:runSession">runSession</a> :: <ahref="TensorFlow-Session.html#t:Session">Session</a> a -><ahref="../base-4.8.2.0/System-IO.html#t:IO">IO</a> a</li><liclass="src short"><ahref="#v:runSessionWithOptions">runSessionWithOptions</a> :: <ahref="TensorFlow-Session.html#t:Options">Options</a> -><ahref="TensorFlow-Session.html#t:Session">Session</a> a -><ahref="../base-4.8.2.0/System-IO.html#t:IO">IO</a> a</li><liclass="src short"><ahref="#v:build">build</a> :: <ahref="TensorFlow-Build.html#t:Build">Build</a> a -><ahref="TensorFlow-Session.html#t:Session">Session</a> a</li><liclass="src short"><ahref="#v:buildAnd">buildAnd</a> :: (a -><ahref="TensorFlow-Session.html#t:Session">Session</a> b) -><ahref="TensorFlow-Build.html#t:Build">Build</a> a -><ahref="TensorFlow-Session.html#t:Session">Session</a> b</li><liclass="src short"><ahref="#v:buildWithSummary">buildWithSummary</a> :: <spanclass="keyword">forall</span> a. <ahref="TensorFlow-Build.html#t:Build">Build</a> a -><ahref="TensorFlow-Session.html#t:Session">Session</a> (a, [<ahref="TensorFlow-Build.html#t:SummaryTensor">SummaryTensor</a>])</li><liclass="src short"><ahref="#v:extend">extend</a> :: <ahref="TensorFlow-Session.html#t:Session">Session</a> ()</li><liclass="src short"><ahref="#v:addGraphDef">addGraphDef</a> :: <ahref="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef">GraphDef</a> -><ahref="TensorFlow-Build.html#t:Build">Build</a> ()</li><liclass="src short"><ahref="#v:run">run</a> :: <ahref="TensorFlow-Nodes.html#t:Fetchable">Fetchable</a> t a => t -><ahref="TensorFlow-Session.html#t:Session">Session</a> a</li><liclass="src short"><ahref="#v:runWithFeeds">runWithFeeds</a> :: <ahref="TensorFlow-Nodes.html#t:Fetchable">Fetchable</a> t a => [<ahref="TensorFlow-Tensor.html#t:Feed">Feed</a>] -> t -><ahref="TensorFlow-Session.html#t:Session">Session</a> a</li><liclass="src short"><ahref="#v:run_">run_</a> :: <ahref="TensorFlow-Nodes.html#t:Nodes">Nodes</a> t => t -><ahref="TensorFlow-Session.html#t:Session">Session</a> ()</li><liclass="src short"><ahref="#v:runWithFeeds_">runWithFeeds_</a> :: <ahref="TensorFlow-Nodes.html#t:Nodes">Nodes</a> t => [<ahref="TensorFlow-Tensor.html#t:Feed">Feed</a>] -> t -><ahref="TensorFlow-Session.html#
<code><ahref="TensorFlow-Session.html#v:sessionTarget">sessionTarget</a></code>, <code><ahref="TensorFlow-Session.html#v:sessionTracer">sessionTracer</a></code>, <code><ahref="TensorFlow-Session.html#v:sessionConfig">sessionConfig</a></code>.</p></div><divclass="subs instances"><pid="control.i:Options"class="caption collapser"onclick="toggleSection('i:Options')">Instances</p><divid="section.i:Options"class="show"><table><tr><tdclass="src clearfix"><spanclass="inst-left"><ahref="../data-default-0.5.3/Data-Default.html#t:Default">Default</a><ahref="TensorFlow-Session.html#t:Options">Options</a></span><ahref="src/TensorFlow-Session.html#line-94"class="link">Source</a></td><tdclass="doc empty"> </td></tr></table></div></div></div><divclass="top"><pclass="src"><aname="v:sessionConfig"class="def">sessionConfig</a> :: <ahref="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a><ahref="TensorFlow-Session.html#t:Options">Options</a><ahref="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Protobuf-Config.html#t:ConfigProto">ConfigProto</a><ahref="src/TensorFlow-Session.html#sessionConfig"class="link">Source</a></p><divclass="doc"><p>Uses the specified config for the created session.</p></div></div><divclass="top"><pclass="src"><aname="v:sessionTarget"class="def">sessionTarget</a> :: <ahref="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a><ahref="TensorFlow-Session.html#t:Options">Options</a><ahref="../bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a><ahref="src/TensorFlow-Session.html#sessionTarget"class="link">Source</a></p><divclass="doc"><p>Target can be: "local", ip:port, host:port.
The set of supported factories depends on the linked in libraries.</p></div></div><divclass="top"><pclass="src"><aname="v:sessionTracer"class="def">sessionTracer</a> :: <ahref="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a><ahref="TensorFlow-Session.html#t:Options">Options</a> Tracer <ahref="src/TensorFlow-Session.html#sessionTracer"class="link">Source</a></p><divclass="doc"><p>Uses the given logger to monitor session progress.</p></div></div><divclass="top"><pclass="src"><aname="v:runSession"class="def">runSession</a> :: <ahref="TensorFlow-Session.html#t:Session">Session</a> a -><ahref="../base-4.8.2.0/System-IO.html#t:IO">IO</a> a <ahref="src/TensorFlow-Session.html#runSession"class="link">Source</a></p><divclass="doc"><p>Run <code><ahref="TensorFlow-Session.html#t:Session">Session</a></code> actions in a new TensorFlow session.</p></div></div><divclass="top"><pclass="src"><aname="v:runSessionWithOptions"class="def">runSessionWithOptions</a> :: <ahref="TensorFlow-Session.html#t:Options">Options</a> -><ahref="TensorFlow-Session.html#t:Session">Session</a> a -><ahref="../base-4.8.2.0/System-IO.html#t:IO">IO</a> a <ahref="src/TensorFlow-Session.html#runSessionWithOptions"class="link">Source</a></p><divclass="doc"><p>Run <code><ahref="TensorFlow-Session.html#t:Session">Session</a></code> actions in a new TensorFlow session created with
the given option setter actions (<code><ahref="TensorFlow-Session.html#v:sessionTarget">sessionTarget</a></code>, <code><ahref="TensorFlow-Session.html#v:sessionConfig">sessionConfig</a></code>).</p></div></div><divclass="top"><pclass="src"><aname="v:build"class="def">build</a> :: <ahref="TensorFlow-Build.html#t:Build">Build</a> a -><ahref="TensorFlow-Session.html#t:Session">Session</a> a <ahref="src/TensorFlow-Session.html#build"class="link">Source</a></p><divclass="doc"><p>Lift a <code><ahref="TensorFlow-Build.html#t:Build">Build</a></code> action into a <code><ahref="TensorFlow-Session.html#t:Session">Session</a></code>, including any explicit op
renderings.</p></div></div><divclass="top"><pclass="src"><aname="v:buildAnd"class="def">buildAnd</a> :: (a -><ahref="TensorFlow-Session.html#t:Session">Session</a> b) -><ahref="TensorFlow-Build.html#t:Build">Build</a> a -><ahref="TensorFlow-Session.html#t:Session">Session</a> b <ahref="src/TensorFlow-Session.html#buildAnd"class="link">Source</a></p><divclass="doc"><p>Helper combinator for doing something with the result of a <code><ahref="TensorFlow-Build.html#t:Build">Build</a></code> action.
Example usage:</p><pre>buildAnd run :: Fetchable t a => Build t -> Session a</pre></div></div><divclass="top"><pclass="src"><aname="v:buildWithSummary"class="def">buildWithSummary</a> :: <spanclass="keyword">forall</span> a. <ahref="TensorFlow-Build.html#t:Build">Build</a> a -><ahref="TensorFlow-Session.html#t:Session">Session</a> (a, [<ahref="TensorFlow-Build.html#t:SummaryTensor">SummaryTensor</a>]) <ahref="src/TensorFlow-Session.html#buildWithSummary"class="link">Source</a></p><divclass="doc"><p>Lift a <code><ahref="TensorFlow-Build.html#t:Build">Build</a></code> action into a <code><ahref="TensorFlow-Session.html#t:Session">Session</a></code>, including any explicit op
logging, see <code><ahref="TensorFlow-Logging.html#v:build">build</a></code> for a convenient wrapper.</p></div></div><divclass="top"><pclass="src"><aname="v:extend"class="def">extend</a> :: <ahref="TensorFlow-Session.html#t:Session">Session</a> () <ahref="src/TensorFlow-Session.html#extend"class="link">Source</a></p><divclass="doc"><p>Add all pending rendered nodes to the TensorFlow graph and runs
any pending initializers.</p><p>Note that run, runWithFeeds, etc. will all call this function implicitly.</p></div></div><divclass="top"><pclass="src"><aname="v:addGraphDef"class="def">addGraphDef</a> :: <ahref="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef">GraphDef</a> -><ahref="TensorFlow-Build.html#t:Build">Build</a> () <ahref="src/TensorFlow-Build.html#addGraphDef"class="link">Source</a></p></div><divclass="top"><pclass="src"><aname="v:run"class="def">run</a> :: <ahref="TensorFlow-Nodes.html#t:Fetchable">Fetchable</a> t a => t -><ahref="TensorFlow-Session.html#t:Session">Session</a> a <ahref="src/TensorFlow-Session.html#run"class="link">Source</a></p><divclass="doc"><p>Run a subgraph <code>t</code>, rendering any dependent nodes that aren't already
rendered, and fetch the corresponding values for <code>a</code>.</p></div></div><divclass="top"><pclass="src"><aname="v:runWithFeeds"class="def">runWithFeeds</a> :: <ahref="TensorFlow-Nodes.html#t:Fetchable">Fetchable</a> t a => [<ahref="TensorFlow-Tensor.html#t:Feed">Feed</a>] -> t -><ahref="TensorFlow-Session.html#t:Session">Session</a> a <ahref="src/TensorFlow-Session.html#runWithFeeds"class="link">Source</a></p><divclass="doc"><p>Run a subgraph <code>t</code>, rendering any dependent nodes that aren't already
values for <code>a</code>.</p></div></div><divclass="top"><pclass="src"><aname="v:run_"class="def">run_</a> :: <ahref="TensorFlow-Nodes.html#t:Nodes">Nodes</a> t => t -><ahref="TensorFlow-Session.html#t:Session">Session</a> () <ahref="src/TensorFlow-Session.html#run_"class="link">Source</a></p><divclass="doc"><p>Run a subgraph <code>t</code>, rendering and extending any dependent nodes that aren't
fetches.</p></div></div><divclass="top"><pclass="src"><aname="v:runWithFeeds_"class="def">runWithFeeds_</a> :: <ahref="TensorFlow-Nodes.html#t:Nodes">Nodes</a> t => [<ahref="TensorFlow-Tensor.html#t:Feed">Feed</a>] -> t -><ahref="TensorFlow-Session.html#t:Session">Session</a> () <ahref="src/TensorFlow-Session.html#runWithFeeds_"class="link">Source</a></p><divclass="doc"><p>Run a subgraph <code>t</code>, rendering any dependent nodes that aren't already
any fetches.</p></div></div><divclass="top"><pclass="src"><aname="v:asyncProdNodes"class="def">asyncProdNodes</a><ahref="src/TensorFlow-Session.html#asyncProdNodes"class="link">Source</a></p><divclass="subs arguments"><pclass="caption">Arguments</p><table><tr><tdclass="src">:: <ahref="TensorFlow-Nodes.html#t:Nodes">Nodes</a> t</td><tdclass="doc empty"> </td></tr><tr><tdclass="src">=> t</td><tdclass="doc"><p>Node to evaluate concurrently.</p></td></tr><tr><tdclass="src">-><ahref="TensorFlow-Session.html#t:Session">Session</a> ()</td><tdclass="doc empty"> </td></tr></table></div><divclass="doc"><p>Starts a concurrent thread which evaluates the given Nodes
forever until runSession exits or an exception occurs. Graph
extension happens synchronously, but the resultant run proceeds as
a separate thread.</p></div></div></div></div><divid="footer"><p>Produced by <ahref="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>