<!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="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> :: Lens' <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> :: Lens' <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> :: Lens' <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"><spanclass="keyword">class</span><ahref="../base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> m =><ahref="#t:MonadBuild">MonadBuild</a> m <spanclass="keyword">where</span><ulclass="subs"><li><ahref="#v:build">build</a> :: <ahref="TensorFlow-Build.html#t:Build">Build</a> a -> m a</li></ul></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-Session.html#t:MonadBuild">MonadBuild</a> m =><ahref="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef">GraphDef</a> -> m ()</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-Session.html#t:Session">Session</a> ()</li></ul></div><divid="interface"><h1>Documentation</h1><divclass="top"><pclass="src"><spanclass="keyword">data</span><aname="t:Session"class="def">Session</a> a</p><divclass="subs instances"><pid="control.i:Session"class="caption collapser"onclick="toggleSection('i:Session')">Instances</p><divid="section.i:Session"class="show"><table><tr><tdclass="src clearfix"><spanclass="inst-left"><ahref="../base-4.8.2.0/Cont
<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">Default <ahref="TensorFlow-Session.html#t:Options">Options</a></span></td><tdclass="doc empty"> </td></tr></table></div></div></div><divclass="top"><pclass="src"><aname="v:sessionConfig"class="def">sessionConfig</a> :: Lens' <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></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> :: Lens' <ahref="TensorFlow-Session.html#t:Options">Options</a><ahref="../bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</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> :: Lens' <ahref="TensorFlow-Session.html#t:Options">Options</a> Tracer</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</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</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"><spanclass="keyword">class</span><ahref="../base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> m =><aname="t:MonadBuild"class="def">MonadBuild</a> m <spanclass="keyword">where</span></p><divclass="doc"><p>Lift a <code><ahref="TensorFlow-Build.html#t:Build">Build</a></code> action into a monad, including any explicit op renderings.</p></div><divclass="subs methods"><pclass="caption">Methods</p><pclass="src"><aname="v:build"class="def">build</a> :: <ahref="TensorFlow-Build.html#t:Build">Build</a> a -> m a</p></div><divclass="subs instances"><pid="control.i:MonadBuild"class="caption collapser"onclick="toggleSection('i:MonadBuild')">Instances</p><divid="section.i:MonadBuild"class="show"><table><tr><tdclass="src clearfix"><spanclass="inst-left"><ahref="TensorFlow-Session.html#t:MonadBuild">MonadBuild</a><ahref="TensorFlow-Session.html#t:Session">Session</a></span></td><tdclass="doc empty"> </td></tr><tr><tdclass="src clearfix"><spanclass="inst-left"><ahref="../base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> m =><ahref="TensorFlow-Session.html#t:MonadBuild">MonadBuild</a> (<ahref="TensorFlow-Build.html#t:BuildT">BuildT</a> m)</span></td><tdclass="doc empty"> </td></tr></table></div></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-Session.html#t:MonadBuild">MonadBuild</a> m =><ahref="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef">GraphDef</a> -> m ()</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>