mirror of
https://github.com/tensorflow/haskell.git
synced 2024-11-30 06:49:44 +01:00
23 lines
No EOL
13 KiB
HTML
23 lines
No EOL
13 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>TensorFlow.Session</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
|
window.onload = function () {pageLoad();setSynopsis("mini_TensorFlow-Session.html");};
|
|
//]]>
|
|
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">tensorflow-0.1.0.0: TensorFlow bindings.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">TensorFlow.Session</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Opaque value created via <code>sessionConfig</code> and <code>sessionTarget</code>.</a></li></ul></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:Session">Session</a> a</li><li class="src short"><span class="keyword">data</span> <a href="#t:SessionOption">SessionOption</a></li><li class="src short"><a href="#v:sessionConfig">sessionConfig</a> :: <a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Protobuf-Config.html#t:ConfigProto">ConfigProto</a> -> <a href="TensorFlow-Session.html#t:SessionOption">SessionOption</a></li><li class="src short"><a href="#v:sessionTarget">sessionTarget</a> :: <a href="../bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="TensorFlow-Session.html#t:SessionOption">SessionOption</a></li><li class="src short"><a href="#v:runSession">runSession</a> :: <a href="TensorFlow-Session.html#t:Session">Session</a> a -> <a href="../base-4.8.2.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:runSessionWithOptions">runSessionWithOptions</a> :: [<a href="TensorFlow-Session.html#t:SessionOption">SessionOption</a>] -> <a href="TensorFlow-Session.html#t:Session">Session</a> a -> <a href="../base-4.8.2.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:build">build</a> :: <a href="TensorFlow-Build.html#t:Build">Build</a> a -> <a href="TensorFlow-Session.html#t:Session">Session</a> a</li><li class="src short"><a href="#v:buildAnd">buildAnd</a> :: (a -> <a href="TensorFlow-Session.html#t:Session">Session</a> b) -> <a href="TensorFlow-Build.html#t:Build">Build</a> a -> <a href="TensorFlow-Session.html#t:Session">Session</a> b</li><li class="src short"><a href="#v:buildWithSummary">buildWithSummary</a> :: <span class="keyword">forall</span> a. <a href="TensorFlow-Build.html#t:Build">Build</a> a -> <a href="TensorFlow-Session.html#t:Session">Session</a> (a, [<a href="TensorFlow-Build.html#t:SummaryTensor">SummaryTensor</a>])</li><li class="src short"><a href="#v:extend">extend</a> :: <a href="TensorFlow-Session.html#t:Session">Session</a> ()</li><li class="src short"><a href="#v:addGraphDef">addGraphDef</a> :: <a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef">GraphDef</a> -> <a href="TensorFlow-Build.html#t:Build">Build</a> ()</li><li class="src short"><a href="#v:run">run</a> :: <a href="TensorFlow-Nodes.html#t:Fetchable">Fetchable</a> t a => t -> <a href="TensorFlow-Session.html#t:Session">Session</a> a</li><li class="src short"><a href="#v:runWithFeeds">runWithFeeds</a> :: <a href="TensorFlow-Nodes.html#t:Fetchable">Fetchable</a> t a => [<a href="TensorFlow-Tensor.html#t:Feed">Feed</a>] -> t -> <a href="TensorFlow-Session.html#t:Session">Session</a> a</li><li class="src short"><a href="#v:run_">run_</a> :: <a href="TensorFlow-Nodes.html#t:Nodes">Nodes</a> t => t -> <a href="TensorFlow-Session.html#t:Session">Session</a> ()</li><li class="src short"><a href="#v:runWithFeeds_">runWithFeeds_</a> :: <a href="TensorFlow-Nodes.html#t:Nodes">Nodes</a> t => [<a href="TensorFlow-Tensor.html#t:Feed">Feed</a>] -> t -> <a href="TensorFlow-Session.html#t:Session">Session</a> ()</li><li class="src short"><a href="#v:asyncProdNodes">asyncProdNodes</a> :: <a href="TensorFlow-Nodes.html#t:Nodes">Nodes</a> t => t -> <a href="TensorFlow-Session.html#t:Session">Session</a> ()</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Session" class="def">Session</a> a</p><div class="subs instances"><p id="control.i:Session" class="caption collapser" onclick="toggleSection('i:Session')">Instances</p><div id="section.i:Session" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> <a href="TensorFlow-Session.html#t:Session">Session</a></span></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> <a href="TensorFlow-Session.html#t:Session">Session</a></span></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a> <a href="TensorFlow-Session.html#t:Session">Session</a></span></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../transformers-0.4.2.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> <a href="TensorFlow-Session.html#t:Session">Session</a></span></td><td class="doc empty"> </td></tr></table></div></div></div><h1 id="g:1">Opaque value created via <code><a href="TensorFlow-Session.html#v:sessionConfig">sessionConfig</a></code> and <code><a href="TensorFlow-Session.html#v:sessionTarget">sessionTarget</a></code>.</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:SessionOption" class="def">SessionOption</a></p><div class="doc"><p>Setting of an option for the session (see <code><a href="TensorFlow-Session.html#v:runSessionWithOptions">runSessionWithOptions</a></code>).</p></div></div><div class="top"><p class="src"><a name="v:sessionConfig" class="def">sessionConfig</a> :: <a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Protobuf-Config.html#t:ConfigProto">ConfigProto</a> -> <a href="TensorFlow-Session.html#t:SessionOption">SessionOption</a></p><div class="doc"><p>Uses the specified config for the created session.</p></div></div><div class="top"><p class="src"><a name="v:sessionTarget" class="def">sessionTarget</a> :: <a href="../bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="TensorFlow-Session.html#t:SessionOption">SessionOption</a></p><div class="doc"><p>Target can be: "local", ip:port, host:port.
|
|
The set of supported factories depends on the linked in libraries.
|
|
REQUIRES "/<em>learning</em>brain/public:tensorflow_remote" dependency for the binary.</p></div></div><div class="top"><p class="src"><a name="v:runSession" class="def">runSession</a> :: <a href="TensorFlow-Session.html#t:Session">Session</a> a -> <a href="../base-4.8.2.0/System-IO.html#t:IO">IO</a> a</p><div class="doc"><p>Run <code><a href="TensorFlow-Session.html#t:Session">Session</a></code> actions in a new TensorFlow session.</p></div></div><div class="top"><p class="src"><a name="v:runSessionWithOptions" class="def">runSessionWithOptions</a> :: [<a href="TensorFlow-Session.html#t:SessionOption">SessionOption</a>] -> <a href="TensorFlow-Session.html#t:Session">Session</a> a -> <a href="../base-4.8.2.0/System-IO.html#t:IO">IO</a> a</p><div class="doc"><p>Run <code><a href="TensorFlow-Session.html#t:Session">Session</a></code> actions in a new TensorFlow session created with
|
|
the given option setter actions (<code><a href="TensorFlow-Session.html#v:sessionTarget">sessionTarget</a></code>, <code><a href="TensorFlow-Session.html#v:sessionConfig">sessionConfig</a></code>).</p></div></div><div class="top"><p class="src"><a name="v:build" class="def">build</a> :: <a href="TensorFlow-Build.html#t:Build">Build</a> a -> <a href="TensorFlow-Session.html#t:Session">Session</a> a</p><div class="doc"><p>Lift a <code><a href="TensorFlow-Build.html#t:Build">Build</a></code> action into a <code><a href="TensorFlow-Session.html#t:Session">Session</a></code>, including any explicit op
|
|
renderings.</p></div></div><div class="top"><p class="src"><a name="v:buildAnd" class="def">buildAnd</a> :: (a -> <a href="TensorFlow-Session.html#t:Session">Session</a> b) -> <a href="TensorFlow-Build.html#t:Build">Build</a> a -> <a href="TensorFlow-Session.html#t:Session">Session</a> b</p><div class="doc"><p>Helper combinator for doing something with the result of a <code><a href="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><div class="top"><p class="src"><a name="v:buildWithSummary" class="def">buildWithSummary</a> :: <span class="keyword">forall</span> a. <a href="TensorFlow-Build.html#t:Build">Build</a> a -> <a href="TensorFlow-Session.html#t:Session">Session</a> (a, [<a href="TensorFlow-Build.html#t:SummaryTensor">SummaryTensor</a>])</p><div class="doc"><p>Lift a <code><a href="TensorFlow-Build.html#t:Build">Build</a></code> action into a <code><a href="TensorFlow-Session.html#t:Session">Session</a></code>, including any explicit op
|
|
renderings. Returns the merged summary ops which can be used for
|
|
logging, see <code><a href="TensorFlow-Logging.html#v:build">build</a></code> for a convenient wrapper.</p></div></div><div class="top"><p class="src"><a name="v:extend" class="def">extend</a> :: <a href="TensorFlow-Session.html#t:Session">Session</a> ()</p><div class="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><div class="top"><p class="src"><a name="v:addGraphDef" class="def">addGraphDef</a> :: <a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef">GraphDef</a> -> <a href="TensorFlow-Build.html#t:Build">Build</a> ()</p></div><div class="top"><p class="src"><a name="v:run" class="def">run</a> :: <a href="TensorFlow-Nodes.html#t:Fetchable">Fetchable</a> t a => t -> <a href="TensorFlow-Session.html#t:Session">Session</a> a</p><div class="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><div class="top"><p class="src"><a name="v:runWithFeeds" class="def">runWithFeeds</a> :: <a href="TensorFlow-Nodes.html#t:Fetchable">Fetchable</a> t a => [<a href="TensorFlow-Tensor.html#t:Feed">Feed</a>] -> t -> <a href="TensorFlow-Session.html#t:Session">Session</a> a</p><div class="doc"><p>Run a subgraph <code>t</code>, rendering any dependent nodes that aren't already
|
|
rendered, feed the given input values, and fetch the corresponding result
|
|
values for <code>a</code>.</p></div></div><div class="top"><p class="src"><a name="v:run_" class="def">run_</a> :: <a href="TensorFlow-Nodes.html#t:Nodes">Nodes</a> t => t -> <a href="TensorFlow-Session.html#t:Session">Session</a> ()</p><div class="doc"><p>Run a subgraph <code>t</code>, rendering and extending any dependent nodes that aren't
|
|
already rendered. This behaves like <code><a href="TensorFlow-Session.html#v:run">run</a></code> except that it doesn't do any
|
|
fetches.</p></div></div><div class="top"><p class="src"><a name="v:runWithFeeds_" class="def">runWithFeeds_</a> :: <a href="TensorFlow-Nodes.html#t:Nodes">Nodes</a> t => [<a href="TensorFlow-Tensor.html#t:Feed">Feed</a>] -> t -> <a href="TensorFlow-Session.html#t:Session">Session</a> ()</p><div class="doc"><p>Run a subgraph <code>t</code>, rendering any dependent nodes that aren't already
|
|
rendered, feed the given input values, and fetch the corresponding result
|
|
values for <code>a</code>. This behaves like <code><a href="TensorFlow-Session.html#v:runWithFeeds">runWithFeeds</a></code> except that it doesn't do
|
|
any fetches.</p></div></div><div class="top"><p class="src"><a name="v:asyncProdNodes" class="def">asyncProdNodes</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="TensorFlow-Nodes.html#t:Nodes">Nodes</a> t</td><td class="doc empty"> </td></tr><tr><td class="src">=> t</td><td class="doc"><p>Node to evaluate concurrently.</p></td></tr><tr><td class="src">-> <a href="TensorFlow-Session.html#t:Session">Session</a> ()</td><td class="doc empty"> </td></tr></table></div><div class="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><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html> |