<!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="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="table-of-contents"><pclass="caption">Contents</p><ul><li><ahref="#g:1">Opaque value created via <code>sessionConfig</code> and <code>sessionTarget</code>.</a></li></ul></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:SessionOption">SessionOption</a></li><liclass="src short"><ahref="#v:sessionConfig">sessionConfig</a> :: <ahref="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Protobuf-Config.html#t:ConfigProto">ConfigProto</a> -><ahref="TensorFlow-Session.html#t:SessionOption">SessionOption</a></li><liclass="src short"><ahref="#v:sessionTarget">sessionTarget</a> :: <ahref="../bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -><ahref="TensorFlow-Session.html#t:SessionOption">SessionOption</a></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:SessionOption">SessionOption</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#t:Session">Session</a> ()</li><liclass="src short"><ahref="#v:asyncProdNodes">asyncProdNodes</a> :: <ahref="TensorFlow-Nodes.html#t:Nodes">Nodes</a> t => t -><ahref="TensorFlow
REQUIRES "/<em>learning</em>brain/public:tensorflow_remote" dependency for the binary.</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</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:SessionOption">SessionOption</a>] -><ahref="TensorFlow-Session.html#t:Session">Session</a> a -><ahref="../base-4.8.2.0/System-IO.html#t:IO">IO</a> 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</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</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>])</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> ()</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> ()</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</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</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> ()</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> ()</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></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>