1
0
mirror of https://github.com/tensorflow/haskell.git synced 2024-06-29 07:58:33 +02:00
tensorflow-haskell/docs/haddock/tensorflow-0.2.0.0/TensorFlow-Core.html

51 lines
193 KiB
HTML
Raw Normal View History

2018-08-14 06:05:49 +02:00
<!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.Core</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/TensorFlow.Core.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">tensorflow-0.2.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.Core</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Session</a><ul><li><a href="#g:2">Building graphs</a></li><li><a href="#g:3">Running graphs</a></li><li><a href="#g:4">Async</a></li></ul></li><li><a href="#g:5">Build</a></li><li><a href="#g:6">Tensor</a><ul><li><a href="#g:7">Element types</a></li></ul></li><li><a href="#g:8">Op combinators</a><ul><li><a href="#g:9">Dependencies</a></li><li><a href="#g:10">Misc</a></li></ul></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>The core functionality of TensorFlow.</p><p>Unless you are defining ops, you do not need to import other modules from
this package.</p><p>Basic ops are provided in the tensorflow-ops and tensorflow-core-ops
packages.</p></div></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">type</span> <a href="#t:Session">Session</a> = <a href="TensorFlow-Session.html#t:SessionT">SessionT</a> <a href="../base-4.10.1.0/System-IO.html#t:IO">IO</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Options">Options</a></li><li class="src short"><a href="#v:sessionConfig">sessionConfig</a> :: Lens' <a href="TensorFlow-Core.html#t:Options">Options</a> <a href="../tensorflow-proto-0.2.0.0/Proto-Tensorflow-Core-Protobuf-Config.html#t:ConfigProto">ConfigProto</a></li><li class="src short"><a href="#v:sessionTarget">sessionTarget</a> :: Lens' <a href="TensorFlow-Core.html#t:Options">Options</a> <a href="../bytestring-0.10.8.2/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:sessionTracer">sessionTracer</a> :: Lens' <a href="TensorFlow-Core.html#t:Options">Options</a> Tracer</li><li class="src short"><a href="#v:runSession">runSession</a> :: (MonadMask m, <a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m) =&gt; <a href="TensorFlow-Session.html#t:SessionT">SessionT</a> m a -&gt; m a</li><li class="src short"><a href="#v:runSessionWithOptions">runSessionWithOptions</a> :: (MonadMask m, <a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m) =&gt; <a href="TensorFlow-Core.html#t:Options">Options</a> -&gt; <a href="TensorFlow-Session.html#t:SessionT">SessionT</a> m a -&gt; m a</li><li class="src short"><span class="keyword">class</span> <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="#t:MonadBuild">MonadBuild</a> m <span class="keyword">where</span><ul class="subs"></ul></li><li class="src short"><span class="keyword">class</span> <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t =&gt; <a href="#t:Fetchable">Fetchable</a> t a</li><li class="src short"><span class="keyword">class</span> <a href="#t:Nodes">Nodes</a> t</li><li class="src short"><a href="#v:run">run</a> :: (<a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> t a) =&gt; t -&gt; <a href="TensorFlow-Session.html#t:SessionT">SessionT</a> m a</li><li class="src short"><a href="#v:run_">run_</a> :: (<a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t) =&gt; t -&gt; <a href="TensorFlow-Session.html#t:SessionT">SessionT</a> m ()</li><li class="src short"><span class="keyword">data</span> <a href="#t:Feed">Feed</a></li><li class="src short"><a href="#v:feed">feed</a> :: <a href="TensorFlow-Tensor.html#t:Rendered">Rendered</a> t =&gt; t a -&gt; <a href="TensorFlow-Core.html#t:TensorData">TensorData</a> a -&gt; <a href="TensorFlow-Core.html#t:Feed">Feed</a></li><li class="src short"><a href="#v:runWithFeeds">runWithFeeds</a> :: (<a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> t a) =&gt; [<a href="TensorFlow-Core.html#t:Feed">Feed</a>] -&gt; t -&gt; <a href="TensorFlow-Session.html#t:SessionT">SessionT</a> m a</li><li class="src short"><a href="#v:runWithFeeds_">runWithFeeds_</a> :: (<a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t) =&gt; [<a href="TensorFlow-Core.html#t:Feed">Feed</a>] -&gt; t -&gt; <a href="TensorFlow-Session.html#t:SessionT">SessionT</a> m ()</li><li class="src short"><a href="#v:asyncProdNodes">asyncProdNodes</a> :: (<a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t) =&gt; t -&gt; <a href="TensorFlow-Session.html#t:SessionT">SessionT</a> m ()</li><li class="src short"><span class="keyword">type</span> <a href="#t:Build">Build</a> = <a href="TensorFlow-Core.h
<code><a href="TensorFlow-Core.html#v:sessionTarget">sessionTarget</a></code>, <code><a href="TensorFlow-Core.html#v:sessionTracer">sessionTracer</a></code>, <code><a href="TensorFlow-Core.html#v:sessionConfig">sessionConfig</a></code>.</p></div><div class="subs instances"><p id="control.i:Options" class="caption collapser" onclick="toggleSection('i:Options')">Instances</p><div id="section.i:Options" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Options:Default:1" class="instance expander" onclick="toggleSection('i:id:Options:Default:1')"></span> Default <a href="TensorFlow-Core.html#t:Options">Options</a></span> <a href="src/TensorFlow.Session.html#line-99" class="link">Source</a> <a href="#t:Options" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Options:Default:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:def">def</a> :: <a href="TensorFlow-Core.html#t:Options">Options</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:sessionConfig" class="def">sessionConfig</a> :: Lens' <a href="TensorFlow-Core.html#t:Options">Options</a> <a href="../tensorflow-proto-0.2.0.0/Proto-Tensorflow-Core-Protobuf-Config.html#t:ConfigProto">ConfigProto</a> <a href="src/TensorFlow.Session.html#sessionConfig" class="link">Source</a> <a href="#v:sessionConfig" class="selflink">#</a></p><div class="doc"><p>Uses the specified config for the created session.</p></div></div><div class="top"><p class="src"><a id="v:sessionTarget" class="def">sessionTarget</a> :: Lens' <a href="TensorFlow-Core.html#t:Options">Options</a> <a href="../bytestring-0.10.8.2/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/TensorFlow.Session.html#sessionTarget" class="link">Source</a> <a href="#v:sessionTarget" class="selflink">#</a></p><div class="doc"><p>Target can be: &quot;local&quot;, ip:port, host:port.
The set of supported factories depends on the linked in libraries.</p></div></div><div class="top"><p class="src"><a id="v:sessionTracer" class="def">sessionTracer</a> :: Lens' <a href="TensorFlow-Core.html#t:Options">Options</a> Tracer <a href="src/TensorFlow.Session.html#sessionTracer" class="link">Source</a> <a href="#v:sessionTracer" class="selflink">#</a></p><div class="doc"><p>Uses the given logger to monitor session progress.</p></div></div><div class="top"><p class="src"><a id="v:runSession" class="def">runSession</a> :: (MonadMask m, <a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m) =&gt; <a href="TensorFlow-Session.html#t:SessionT">SessionT</a> m a -&gt; m a <a href="src/TensorFlow.Session.html#runSession" class="link">Source</a> <a href="#v:runSession" class="selflink">#</a></p><div class="doc"><p>Run <code><a href="TensorFlow-Core.html#t:Session">Session</a></code> actions in a new TensorFlow session.</p></div></div><div class="top"><p class="src"><a id="v:runSessionWithOptions" class="def">runSessionWithOptions</a> :: (MonadMask m, <a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m) =&gt; <a href="TensorFlow-Core.html#t:Options">Options</a> -&gt; <a href="TensorFlow-Session.html#t:SessionT">SessionT</a> m a -&gt; m a <a href="src/TensorFlow.Session.html#runSessionWithOptions" class="link">Source</a> <a href="#v:runSessionWithOptions" class="selflink">#</a></p><div class="doc"><p>Run <code><a href="TensorFlow-Core.html#t:Session">Session</a></code> actions in a new TensorFlow session created with
the given option setter actions (<code><a href="TensorFlow-Core.html#v:sessionTarget">sessionTarget</a></code>, <code><a href="TensorFlow-Core.html#v:sessionConfig">sessionConfig</a></code>).</p></div></div><h2 id="g:2">Building graphs</h2><div class="top"><p class="src"><span class="keyword">class</span> <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a id="t:MonadBuild" class="def">MonadBuild</a> m <span class="keyword">where</span> <a href="src/TensorFlow.Build.html#MonadBuild" class="link">Source</a> <a href="#t:MonadBuild" class="selflink">#</a></p><div class="doc"><p>Lift a <code><a href="TensorFlow-Core.html#t:Build">Build</a></code> action into a monad, including any explicit op renderings.</p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="TensorFlow-Core.html#v:build">build</a></p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a id="v:build" class="def">build</a> :: <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; m a <a href="src/TensorFlow.Build.html#build" class="link">Source</a> <a href="#v:build" class="selflink">#</a></p></div><div class="subs instances"><p id="control.i:MonadBuild" class="caption collapser" onclick="toggleSection('i:MonadBuild')">Instances</p><div id="section.i:MonadBuild" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadBuild:MonadBuild:1" class="instance expander" onclick="toggleSection('i:ic:MonadBuild:MonadBuild:1')"></span> <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> (<a href="TensorFlow-Core.html#t:BuildT">BuildT</a> m)</span> <a href="src/TensorFlow.Build.html#line-215" class="link">Source</a> <a href="#t:MonadBuild" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:MonadBuild:MonadBuild:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:build">build</a> :: <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Core.html#t:BuildT">BuildT</a> m a <a href="src/TensorFlow.Build.html#build" class="link">Source</a> <a href="#v:build" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadBuild:MonadBuild:2" class="instance expander" onclick="toggleSection('i:ic:MonadBuild:MonadBuild:2')"></span> <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> (<a href="TensorFlow-Session.html#t:SessionT">SessionT</a> m)</span> <a href="src/TensorFlow.Build.html#line-131" class="link">Source</a> <a href="#t:MonadBuild" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:MonadBuild:MonadBuild:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:build">build</a> :: <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Session.html#t:SessionT">SessionT</a> m a <a href="src/TensorFlow.Build.html#build" class="link">Source</a> <a href="#v:build" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><h2 id="g:3">Running graphs</h2><div class="top"><p class="src"><span class="keyword">class</span> <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t =&gt; <a id="t:Fetchable" class="def">Fetchable</a> t a <a href="src/TensorFlow.Nodes.html#Fetchable" class="link">Source</a> <a href="#t:Fetchable" class="selflink">#</a></p><div class="doc"><p>Types that tensor representations (e.g. <code><a href="TensorFlow-Core.html#t:Tensor">Tensor</a></code>, <code><a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a></code>) can be
fetched into.</p><p>Includes collections of tensors (e.g. tuples).</p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="TensorFlow-Nodes.html#v:getFetch">getFetch</a></p></div><div class="subs instances"><p id="control.i:Fetchable" class="caption collapser" onclick="toggleSection('i:Fetchable')">Instances</p><div id="section.i:Fetchable" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Fetchable:Fetchable:1" class="instance expander" onclick="toggleSection('i:ic:Fetchable:Fetchable:1')"></span> (~) <a href="../base-4.10.1.0/Data-Kind.html#t:-42-">*</a> a () =&gt; <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a> a</span> <a href="src/TensorFlow.Nodes.html#line-105" class="link">Source</a> <a href="#t:Fetchable" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Fetchable:Fetchable:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:getFetch">getFetch</a> :: <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a> -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> (<a href="TensorFlow-Nodes.html#t:Fetch">Fetch</a> a) <a href="src/TensorFlow.Nodes.html#getFetch" class="link">Source</a> <a href="#v:getFetch" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Fetchable:Fetchable:2" class="instance expander" onclick="toggleSection('i:ic:Fetchable:Fetchable:2')"></span> <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> t a =&gt; <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> [t] [a]</span> <a href="src/TensorFlow.Nodes.html#line-89" class="link">Source</a> <a href="#t:Fetchable" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Fetchable:Fetchable:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:getFetch">getFetch</a> :: [t] -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> (<a href="TensorFlow-Nodes.html#t:Fetch">Fetch</a> [a]) <a href="src/TensorFlow.Nodes.html#getFetch" class="link">Source</a> <a href="#v:getFetch" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Fetchable:Fetchable:3" class="instance expander" onclick="toggleSection('i:ic:Fetchable:Fetchable:3')"></span> <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> t a =&gt; <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> (<a href="../base-4.10.1.0/Data-Maybe.html#t:Maybe">Maybe</a> t) (<a href="../base-4.10.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a)</span> <a href="src/TensorFlow.Nodes.html#line-95" class="link">Source</a> <a href="#t:Fetchable" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Fetchable:Fetchable:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:getFetch">getFetch</a> :: <a href="../base-4.10.1.0/Data-Maybe.html#t:Maybe">Maybe</a> t -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> (<a href="TensorFlow-Nodes.html#t:Fetch">Fetch</a> (<a href="../base-4.10.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a)) <a href="src/TensorFlow.Nodes.html#getFetch" class="link">Source</a> <a href="#v:getFetch" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Fetchable:Fetchable:4" class="instance expander" onclick="toggleSection('i:ic:Fetchable:Fetchable:4')"></span> (~) <a href="../base-4.10.1.0/Data-Kind.html#t:-42-">*</a> l (<a href="TensorFlow-Types.html#t:List">List</a> ([] <a href="../base-4.10.1.0/Data-Kind.html#t:-42-">*</a>)) =&gt; <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> (<a href="TensorFlow-Types.html#t:ListOf">ListOf</a> f ([] <a href="../base-4.10.1.0/Data-Kin
rendered, and fetch the corresponding values for <code>a</code>.</p></div></div><div class="top"><p class="src"><a id="v:run_" class="def">run_</a> :: (<a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t) =&gt; t -&gt; <a href="TensorFlow-Session.html#t:SessionT">SessionT</a> m () <a href="src/TensorFlow.Session.html#run_" class="link">Source</a> <a href="#v:run_" class="selflink">#</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-Core.html#v:run">run</a></code> except that it doesn't do any
fetches.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Feed" class="def">Feed</a> <a href="src/TensorFlow.Tensor.html#Feed" class="link">Source</a> <a href="#t:Feed" class="selflink">#</a></p><div class="doc"><p>A pair of a <code><a href="TensorFlow-Core.html#t:Tensor">Tensor</a></code> and some data that should be fed into that <code><a href="TensorFlow-Core.html#t:Tensor">Tensor</a></code>
when running the graph.</p></div></div><div class="top"><p class="src"><a id="v:feed" class="def">feed</a> :: <a href="TensorFlow-Tensor.html#t:Rendered">Rendered</a> t =&gt; t a -&gt; <a href="TensorFlow-Core.html#t:TensorData">TensorData</a> a -&gt; <a href="TensorFlow-Core.html#t:Feed">Feed</a> <a href="src/TensorFlow.Tensor.html#feed" class="link">Source</a> <a href="#v:feed" class="selflink">#</a></p><div class="doc"><p>Create a <code><a href="TensorFlow-Core.html#t:Feed">Feed</a></code> for feeding the given data into a <code><a href="TensorFlow-Core.html#t:Tensor">Tensor</a></code> when running
the graph.</p><p>Note that if a <code><a href="TensorFlow-Core.html#t:Tensor">Tensor</a></code> is rendered, its identity may change; so feeding the
rendered <code><a href="TensorFlow-Core.html#t:Tensor">Tensor</a></code> may be different than feeding the original <code><a href="TensorFlow-Core.html#t:Tensor">Tensor</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:runWithFeeds" class="def">runWithFeeds</a> :: (<a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> t a) =&gt; [<a href="TensorFlow-Core.html#t:Feed">Feed</a>] -&gt; t -&gt; <a href="TensorFlow-Session.html#t:SessionT">SessionT</a> m a <a href="src/TensorFlow.Session.html#runWithFeeds" class="link">Source</a> <a href="#v:runWithFeeds" class="selflink">#</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 id="v:runWithFeeds_" class="def">runWithFeeds_</a> :: (<a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t) =&gt; [<a href="TensorFlow-Core.html#t:Feed">Feed</a>] -&gt; t -&gt; <a href="TensorFlow-Session.html#t:SessionT">SessionT</a> m () <a href="src/TensorFlow.Session.html#runWithFeeds_" class="link">Source</a> <a href="#v:runWithFeeds_" class="selflink">#</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-Core.html#v:runWithFeeds">runWithFeeds</a></code> except that it doesn't do
any fetches.</p></div></div><h2 id="g:4">Async</h2><div class="top"><p class="src"><a id="v:asyncProdNodes" class="def">asyncProdNodes</a> <a href="src/TensorFlow.Session.html#asyncProdNodes" class="link">Source</a> <a href="#v:asyncProdNodes" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; t</td><td class="doc"><p>Node to evaluate concurrently.</p></td></tr><tr><td class="src">-&gt; <a href="TensorFlow-Session.html#t:SessionT">SessionT</a> m ()</td><td class="doc empty">&nbsp;</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><h1 id="g:5">Build</h1><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:Build" class="def">Build</a> = <a href="TensorFlow-Core.html#t:BuildT">BuildT</a> <a href="../base-4.10.1.0/Data-Functor-Identity.html#t:Identity">Identity</a> <a href="src/TensorFlow.Build.html#Build" class="link">Source</a> <a href="#t:Build" class="selflink">#</a></p><div class="doc"><p>An action for building nodes in a TensorFlow graph.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:BuildT" class="def">BuildT</a> m a <a href="src/TensorFlow.Build.html#BuildT" class="link">Source</a> <a href="#t:BuildT" class="selflink">#</a></p><div class="doc"><p>An action for building nodes in a TensorFlow graph.
Used to manage build state internally as part of the <code>Session</code> monad.</p></div><div class="subs instances"><p id="control.i:BuildT" class="caption collapser" onclick="toggleSection('i:BuildT')">Instances</p><div id="section.i:BuildT" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:BuildT:MonadTrans:1" class="instance expander" onclick="toggleSection('i:id:BuildT:MonadTrans:1')"></span> <a href="../transformers-0.5.2.0/Control-Monad-Trans-Class.html#t:MonadTrans">MonadTrans</a> <a href="TensorFlow-Core.html#t:BuildT">BuildT</a></span> <a href="src/TensorFlow.Build.html#line-194" class="link">Source</a> <a href="#t:BuildT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:BuildT:MonadTrans:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:lift">lift</a> :: <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m a -&gt; <a href="TensorFlow-Core.html#t:BuildT">BuildT</a> m a <a href="#v:lift" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:BuildT:TensorKind:2" class="instance expander" onclick="toggleSection('i:id:BuildT:TensorKind:2')"></span> <a href="TensorFlow-Tensor.html#t:TensorKind">TensorKind</a> <a href="TensorFlow-Core.html#t:Build">Build</a></span> <a href="src/TensorFlow.Tensor.html#line-191" class="link">Source</a> <a href="#t:TensorKind" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:BuildT:TensorKind:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toBuild">toBuild</a> :: <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> a <a href="src/TensorFlow.Tensor.html#toBuild" class="link">Source</a> <a href="#v:toBuild" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:BuildT:MonadState:3" class="instance expander" onclick="toggleSection('i:id:BuildT:MonadState:3')"></span> <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; MonadState <a href="TensorFlow-Build.html#t:GraphState">GraphState</a> (<a href="TensorFlow-Core.html#t:BuildT">BuildT</a> m)</span> <a href="src/TensorFlow.Build.html#line-195" class="link">Source</a> <a href="#t:BuildT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:BuildT:MonadState:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:get">get</a> :: <a href="TensorFlow-Core.html#t:BuildT">BuildT</a> m <a href="TensorFlow-Build.html#t:GraphState">GraphState</a></p><p class="src"><a href="#v:put">put</a> :: <a href="TensorFlow-Build.html#t:GraphState">GraphState</a> -&gt; <a href="TensorFlow-Core.html#t:BuildT">BuildT</a> m ()</p><p class="src"><a href="#v:state">state</a> :: (<a href="TensorFlow-Build.html#t:GraphState">GraphState</a> -&gt; (a, <a href="TensorFlow-Build.html#t:GraphState">GraphState</a>)) -&gt; <a href="TensorFlow-Core.html#t:BuildT">BuildT</a> m a</p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:BuildT:Monad:4" class="instance expander" onclick="toggleSection('i:id:BuildT:Monad:4')"></span> <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> (<a href="TensorFlow-Core.html#t:BuildT">BuildT</a> m)</span> <a href="src/TensorFlow.Build.html#line-194" class="link">Source</a> <a href="#t:BuildT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:BuildT:Monad:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-62--62--61-">(&gt;&gt;=)</a> :: <a href="TensorFlow-Core.html#t:BuildT">Bu
the <code><a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a></code> context. Also renders any dependencies of the <code><a href="TensorFlow-Core.html#t:Tensor">Tensor</a></code> that
weren't already rendered.</p><p>This operation is idempotent; calling <code><a href="TensorFlow-Core.html#v:render">render</a></code> on the same input in the same
context will produce the same result. However, rendering the same
<code>Tensor Build</code> in two different contexts may result in two different
<code>Tensor Value</code>s.</p></div></div><div class="top"><p class="src"><a id="v:asGraphDef" class="def">asGraphDef</a> :: <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; <a href="../tensorflow-proto-0.2.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef">GraphDef</a> <a href="src/TensorFlow.Build.html#asGraphDef" class="link">Source</a> <a href="#v:asGraphDef" class="selflink">#</a></p><div class="doc"><p>Produce a GraphDef proto representation of the nodes that are rendered in
the given <code><a href="TensorFlow-Core.html#t:Build">Build</a></code> action.</p></div></div><div class="top"><p class="src"><a id="v:addGraphDef" class="def">addGraphDef</a> :: <a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> m =&gt; <a href="../tensorflow-proto-0.2.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef">GraphDef</a> -&gt; m () <a href="src/TensorFlow.Build.html#addGraphDef" class="link">Source</a> <a href="#v:addGraphDef" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:opName" class="def">opName</a> :: Lens' <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> <a href="TensorFlow-Output.html#t:PendingNodeName">PendingNodeName</a> <a href="src/TensorFlow.Output.html#opName" class="link">Source</a> <a href="#v:opName" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:opAttr" class="def">opAttr</a> :: <a href="TensorFlow-Types.html#t:Attribute">Attribute</a> a =&gt; Text -&gt; Lens' <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> a <a href="src/TensorFlow.Output.html#opAttr" class="link">Source</a> <a href="#v:opAttr" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:addInitializer" class="def">addInitializer</a> :: <a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> m =&gt; <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a> -&gt; m () <a href="src/TensorFlow.Build.html#addInitializer" class="link">Source</a> <a href="#v:addInitializer" class="selflink">#</a></p><div class="doc"><p>Registers the given node to be executed before the next
<code><a href="TensorFlow-Session.html#v:run">run</a></code>.</p></div></div><h1 id="g:6">Tensor</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:ControlNode" class="def">ControlNode</a> <a href="src/TensorFlow.Output.html#ControlNode" class="link">Source</a> <a href="#t:ControlNode" class="selflink">#</a></p><div class="doc"><p>A type of graph node which has no outputs. These nodes are
valuable for causing side effects when they are run.</p></div><div class="subs instances"><p id="control.i:ControlNode" class="caption collapser" onclick="toggleSection('i:ControlNode')">Instances</p><div id="section.i:ControlNode" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ControlNode:Nodes:1" class="instance expander" onclick="toggleSection('i:id:ControlNode:Nodes:1')"></span> <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a></span> <a href="src/TensorFlow.Nodes.html#line-98" class="link">Source</a> <a href="#t:Nodes" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ControlNode:Nodes:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:getNodes">getNodes</a> :: <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a> -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> (<a href="../containers-0.5.10.2/Data-Set-Internal.html#t:Set">Set</a> <a href="TensorFlow-Output.html#t:NodeName">NodeName</a>) <a href="src/TensorFlow.Nodes.html#getNodes" class="link">Source</a> <a href="#v:getNodes" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ControlNode:BuildResult:2" class="instance expander" onclick="toggleSection('i:id:ControlNode:BuildResult:2')"></span> <a href="TensorFlow-BuildOp.html#t:BuildResult">BuildResult</a> <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a></span> <a href="src/TensorFlow.BuildOp.html#line-132" class="link">Source</a> <a href="#t:BuildResult" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ControlNode:BuildResult:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:buildResult">buildResult</a> :: Result <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a> <a href="src/TensorFlow.BuildOp.html#buildResult" class="link">Source</a> <a href="#v:buildResult" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ControlNode:Fetchable:3" class="instance expander" onclick="toggleSection('i:id:ControlNode:Fetchable:3')"></span> (~) <a href="../base-4.10.1.0/Data-Kind.html#t:-42-">*</a> a () =&gt; <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a> a</span> <a href="src/TensorFlow.Nodes.html#line-105" class="link">Source</a> <a href="#t:Fetchable" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ControlNode:Fetchable:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:getFetch">getFetch</a> :: <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a> -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> (<a href="TensorFlow-Nodes.html#t:Fetch">Fetch</a> a) <a href="src/TensorFlow.Nodes.html#getFetch" class="link">Source</a> <a href="#v:getFetch" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Tensor" class="def">Tensor</a> v a <a href="src/TensorFlow.Tensor.html#Tensor" class="link">Source</a> <a href="#t:Tensor" class="selflink">#</a></p><div class="doc"><p>A named output of a TensorFlow operation.</p><p>The type parameter <code>a</code> is the type of the elements in the <code><a href="TensorFlow-Core.html#t:Tensor">Tensor</a></code>. The
parameter <code>v</code> is either:</p><ul><li><code><a href="TensorFlow-Core.html#t:Build">Build</a></code>: An unrendered, immutable value.</li><li><code><a href="TensorFlow-Core.html#t:Value">Value</a></code>: A rendered, immutable value.</li><li><code><a href="TensorFlow-Core.html#t:Ref">Ref</a></code>: A rendered stateful handle (e.g., a variable).</li></ul><p>Note that <code><a href="TensorFlow-Core.html#v:expr">expr</a></code>, <code><a href="TensorFlow-Core.html#v:value">value</a></code>, <code><a href="TensorFlow-Core.html#v:render">render</a></code> and <code><a href="TensorFlow-Tensor.html#v:renderValue">renderValue</a></code> can help convert between
the different types of <code><a href="TensorFlow-Core.html#t:Tensor">Tensor</a></code>.</p></div><div class="subs instances"><p id="control.i:Tensor" class="caption collapser" onclick="toggleSection('i:Tensor')">Instances</p><div id="section.i:Tensor" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Tensor:ToTensor:1" class="instance expander" onclick="toggleSection('i:id:Tensor:ToTensor:1')"></span> <a href="TensorFlow-Tensor.html#t:TensorKind">TensorKind</a> v =&gt; <a href="TensorFlow-Tensor.html#t:ToTensor">ToTensor</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v)</span> <a href="src/TensorFlow.Tensor.html#line-199" class="link">Source</a> <a href="#t:Tensor" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Tensor:ToTensor:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toTensor">toTensor</a> :: <a href="TensorFlow-Core.html#t:TensorType">TensorType</a> a =&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a -&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Build">Build</a> a <a href="src/TensorFlow.Tensor.html#toTensor" class="link">Source</a> <a href="#v:toTensor" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Tensor:Rendered:2" class="instance expander" onclick="toggleSection('i:id:Tensor:Rendered:2')"></span> <a href="TensorFlow-Tensor.html#t:Rendered">Rendered</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Ref">Ref</a>)</span> <a href="src/TensorFlow.Tensor.html#line-100" class="link">Source</a> <a href="#t:Tensor" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Tensor:Rendered:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:renderedOutput">renderedOutput</a> :: <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Ref">Ref</a> a -&gt; <a href="TensorFlow-Output.html#t:Output">Output</a> <a href="src/TensorFlow.Tensor.html#renderedOutput" class="link">Source</a> <a href="#v:renderedOutput" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Tensor:Rendered:3" class="instance expander" onclick="toggleSection('i:id:Tensor:Rendered:3')"></span> <a href="TensorFlow-Tensor.html#t:Rendered">Rendered</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Value">Value</a>)</span> <a href="src/TensorFlow.Tensor.html#line-97" class="link">Source</a> <a href="#t:Tensor" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Tensor:Rendered:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:renderedOutput">renderedOutput</a> :: <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Value">Value</a> a -&gt; <a href="TensorFlow-Output.html#t:Output">Output</a> <a href="src/TensorFlow.Tensor.html#renderedOutput" class="link">Source</a> <a href="#v:renderedOutput" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Tensor:Nodes:4" class="instance expander" onclick="toggleSection('i:id:Tensor:Nodes:4')"></span> <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a)</span> <a href="src/TensorFlow.Nodes.html#line-121" class="link">Source</a> <a href="#t:Nodes" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Tensor:Nodes:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:getNodes">getNodes</a> :: <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a -&gt; <a href=
in a <code>GraphDef</code> that was loaded via <code><a href="TensorFlow-Core.html#v:addGraphDef">addGraphDef</a></code>.
TODO(judahjacobson): add more safety checks here.</p></div></div><div class="top"><p class="src"><a id="v:expr" class="def">expr</a> :: <a href="TensorFlow-Tensor.html#t:TensorKind">TensorKind</a> v =&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a -&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Build">Build</a> a <a href="src/TensorFlow.Tensor.html#expr" class="link">Source</a> <a href="#v:expr" class="selflink">#</a></p></div><h2 id="g:7">Element types</h2><div class="top"><p class="src"><span class="keyword">class</span> <a id="t:TensorType" class="def">TensorType</a> a <a href="src/TensorFlow.Types.html#TensorType" class="link">Source</a> <a href="#t:TensorType" class="selflink">#</a></p><div class="doc"><p>The class of scalar types supported by tensorflow.</p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="TensorFlow-Types.html#v:tensorType">tensorType</a>, <a href="TensorFlow-Types.html#v:tensorRefType">tensorRefType</a>, <a href="TensorFlow-Types.html#v:tensorVal">tensorVal</a></p></div><div class="subs instances"><p id="control.i:TensorType" class="caption collapser" onclick="toggleSection('i:TensorType')">Instances</p><div id="section.i:TensorType" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:TensorType:TensorType:1" class="instance expander" onclick="toggleSection('i:ic:TensorType:TensorType:1')"></span> <a href="TensorFlow-Core.html#t:TensorType">TensorType</a> <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a></span> <a href="src/TensorFlow.Types.html#line-198" class="link">Source</a> <a href="#t:TensorType" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:TensorType:TensorType:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:tensorType">tensorType</a> :: <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="TensorFlow-Types.html#t:DataType">DataType</a> <a href="src/TensorFlow.Types.html#tensorType" class="link">Source</a> <a href="#v:tensorType" class="selflink">#</a></p><p class="src"><a href="#v:tensorRefType">tensorRefType</a> :: <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="TensorFlow-Types.html#t:DataType">DataType</a> <a href="src/TensorFlow.Types.html#tensorRefType" class="link">Source</a> <a href="#v:tensorRefType" class="selflink">#</a></p><p class="src"><a href="#v:tensorVal">tensorVal</a> :: Lens' <a href="../tensorflow-proto-0.2.0.0/Proto-Tensorflow-Core-Framework-Tensor.html#t:TensorProto">TensorProto</a> [<a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a>] <a href="src/TensorFlow.Types.html#tensorVal" class="link">Source</a> <a href="#v:tensorVal" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:TensorType:TensorType:2" class="instance expander" onclick="toggleSection('i:ic:TensorType:TensorType:2')"></span> <a href="TensorFlow-Core.html#t:TensorType">TensorType</a> <a href="../base-4.10.1.0/Prelude.html#t:Double">Double</a></span> <a href="src/TensorFlow.Types.html#line-145" class="link">Source</a> <a href="#t:TensorType" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:TensorType:TensorType:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:tensorType">tensorType</a> :: <a href="../base-4.10.1.0/Prelude.html#t:Double">Double</a> -&gt; <a href="TensorFlow-Types.html#t:DataType">DataType</a> <a href="src/TensorFlow.Types.html#tensorType" class="link">Source</a> <a href="#v:tensorType" class="selflink">#</a></p><p class="src"><a href="#v:tensorRefType">tensorRefType</a> :: <a href="../base-4.10.1.0/Prelude.html#t:Double">Double</a> -&gt; <a href="TensorFlow-Types.html#t:DataType">DataType</a> <a href="src/TensorFlow.Types.html#tensorRefType" class="link">Source</a> <
element 1: index (0, ..., 1)
...</p></div></div><div class="subs instances"><p id="control.i:TensorDataType" class="caption collapser" onclick="toggleSection('i:TensorDataType')">Instances</p><div id="section.i:TensorDataType" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:TensorDataType:TensorDataType:1" class="instance expander" onclick="toggleSection('i:ic:TensorDataType:TensorDataType:1')"></span> <a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a></span> <a href="src/TensorFlow.Types.html#line-293" class="link">Source</a> <a href="#t:TensorDataType" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:TensorDataType:TensorDataType:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:decodeTensorData">decodeTensorData</a> :: <a href="TensorFlow-Core.html#t:TensorData">TensorData</a> <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; Vector <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/TensorFlow.Types.html#decodeTensorData" class="link">Source</a> <a href="#v:decodeTensorData" class="selflink">#</a></p><p class="src"><a href="#v:encodeTensorData">encodeTensorData</a> :: <a href="TensorFlow-Core.html#t:Shape">Shape</a> -&gt; Vector <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="TensorFlow-Core.html#t:TensorData">TensorData</a> <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/TensorFlow.Types.html#encodeTensorData" class="link">Source</a> <a href="#v:encodeTensorData" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:TensorDataType:TensorDataType:2" class="instance expander" onclick="toggleSection('i:ic:TensorDataType:TensorDataType:2')"></span> <a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.10.1.0/Prelude.html#t:Double">Double</a></span> <a href="src/TensorFlow.Types.html#line-263" class="link">Source</a> <a href="#t:TensorDataType" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:TensorDataType:TensorDataType:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:decodeTensorData">decodeTensorData</a> :: <a href="TensorFlow-Core.html#t:TensorData">TensorData</a> <a href="../base-4.10.1.0/Prelude.html#t:Double">Double</a> -&gt; Vector <a href="../base-4.10.1.0/Prelude.html#t:Double">Double</a> <a href="src/TensorFlow.Types.html#decodeTensorData" class="link">Source</a> <a href="#v:decodeTensorData" class="selflink">#</a></p><p class="src"><a href="#v:encodeTensorData">encodeTensorData</a> :: <a href="TensorFlow-Core.html#t:Shape">Shape</a> -&gt; Vector <a href="../base-4.10.1.0/Prelude.html#t:Double">Double</a> -&gt; <a href="TensorFlow-Core.html#t:TensorData">TensorData</a> <a href="../base-4.10.1.0/Prelude.html#t:Double">Double</a> <a href="src/TensorFlow.Types.html#encodeTensorData" class="link">Source</a> <a href="#v:encodeTensorData" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:TensorDataType:TensorDataType:3" class="instance expander" onclick="toggleSection('i:ic:TensorDataType:TensorDataType:3')"></span> <a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.10.1.0/Prelude.html#t:Float">Float</a></span> <a href="src/TensorFlow.Types.html#line-259" class="link">Source</a> <a href="#t:TensorDataType" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:TensorDataType:TensorDataType:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:decodeTensorData">decodeTensorData</a> :: <a href="TensorFlow-Core.html#t:TensorData">TensorData</a> <a href="../base-4.10.1.0/P
<code>Nothing :: Maybe Shape</code> in Haskell.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Shape" class="def">Shape</a> [<a href="../base-4.10.1.0/Data-Int.html#t:Int64">Int64</a>]</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Shape" class="caption collapser" onclick="toggleSection('i:Shape')">Instances</p><div id="section.i:Shape" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Shape:IsList:1" class="instance expander" onclick="toggleSection('i:id:Shape:IsList:1')"></span> <a href="../base-4.10.1.0/GHC-Exts.html#t:IsList">IsList</a> <a href="TensorFlow-Core.html#t:Shape">Shape</a></span> <a href="src/TensorFlow.Types.html#line-386" class="link">Source</a> <a href="#t:Shape" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Shape:IsList:1" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="../base-4.10.1.0/GHC-Exts.html#t:Item">Item</a> <a href="TensorFlow-Core.html#t:Shape">Shape</a> :: <a href="../base-4.10.1.0/Data-Kind.html#t:-42-">*</a> <a href="#t:Item" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fromList">fromList</a> :: [<a href="../base-4.10.1.0/GHC-Exts.html#t:Item">Item</a> <a href="TensorFlow-Core.html#t:Shape">Shape</a>] -&gt; <a href="TensorFlow-Core.html#t:Shape">Shape</a> <a href="#v:fromList" class="selflink">#</a></p><p class="src"><a href="#v:fromListN">fromListN</a> :: <a href="../base-4.10.1.0/Data-Int.html#t:Int">Int</a> -&gt; [<a href="../base-4.10.1.0/GHC-Exts.html#t:Item">Item</a> <a href="TensorFlow-Core.html#t:Shape">Shape</a>] -&gt; <a href="TensorFlow-Core.html#t:Shape">Shape</a> <a href="#v:fromListN" class="selflink">#</a></p><p class="src"><a href="#v:toList">toList</a> :: <a href="TensorFlow-Core.html#t:Shape">Shape</a> -&gt; [<a href="../base-4.10.1.0/GHC-Exts.html#t:Item">Item</a> <a href="TensorFlow-Core.html#t:Shape">Shape</a>] <a href="#v:toList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Shape:Show:2" class="instance expander" onclick="toggleSection('i:id:Shape:Show:2')"></span> <a href="../base-4.10.1.0/Text-Show.html#t:Show">Show</a> <a href="TensorFlow-Core.html#t:Shape">Shape</a></span> <a href="src/TensorFlow.Types.html#line-384" class="link">Source</a> <a href="#t:Shape" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Shape:Show:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="../base-4.10.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="TensorFlow-Core.html#t:Shape">Shape</a> -&gt; <a href="../base-4.10.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="TensorFlow-Core.html#t:Shape">Shape</a> -&gt; <a href="../base-4.10.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="TensorFlow-Core.html#t:Shape">Shape</a>] -&gt; <a href="../base-4.10.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Shape:Attribute:3" class="instance expander" onclick="toggleSection('i:id:Shape:Attribute:3')"></span> <a href="TensorFlow-Types.html#t:Attribute">Attribute</a> <a href="TensorFlow-Core.html#t:Shape">Shape</a></span> <a href="src/TensorFlow.Types.html#line-435" class="link">Source</a> <a href="#t:Shape" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Shape:Attribute:3" class="inst-det
natural representation as a conjunction, i.e.,</p><pre> a == Double || a == Float
</pre><p>into a disjunction like</p><pre> a /= Int32 &amp;&amp; a /= Int64 &amp;&amp; a /= ByteString &amp;&amp; ...
</pre><p>using an enumeration of all the possible <code><a href="TensorFlow-Core.html#t:TensorType">TensorType</a></code>s.</p></div></div><div class="top"><p class="src"><span class="keyword">type family</span> a <a id="t:-47--61-" class="def">/=</a> b :: <a href="../base-4.10.1.0/Data-Kind.html#t:Constraint">Constraint</a> <span class="keyword">where ...</span> <a href="src/TensorFlow.Types.html#%2F%3D" class="link">Source</a> <a href="#t:-47--61-" class="selflink">#</a></p><div class="doc"><p>A constraint checking that two types are different.</p></div><div class="subs equations"><p class="caption">Equations</p><table><tr><td class="src">a <a href="TensorFlow-Core.html#t:-47--61-">/=</a> a = <a href="TensorFlow-Types.html#t:TypeError">TypeError</a> a ~ <a href="TensorFlow-Types.html#t:ExcludedCase">ExcludedCase</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">a <a href="TensorFlow-Core.html#t:-47--61-">/=</a> b = ()</td><td class="doc empty">&nbsp;</td></tr></table></div></div><h1 id="g:8">Op combinators</h1><div class="top"><p class="src"><a id="v:colocateWith" class="def">colocateWith</a> :: (<a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> m, <a href="TensorFlow-Tensor.html#t:Rendered">Rendered</a> t) =&gt; t b -&gt; m a -&gt; m a <a href="src/TensorFlow.Tensor.html#colocateWith" class="link">Source</a> <a href="#v:colocateWith" class="selflink">#</a></p><div class="doc"><p>Places all nodes rendered in the given <code><a href="TensorFlow-Core.html#t:Build">Build</a></code> action on the same
device as the given Tensor (see also <code><a href="TensorFlow-Core.html#v:withDevice">withDevice</a></code>). Make sure that
the action has side effects of rendering the desired tensors. A pure
return would not have the desired effect.</p></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a id="t:Device" class="def">Device</a> <a href="src/TensorFlow.Output.html#Device" class="link">Source</a> <a href="#t:Device" class="selflink">#</a></p><div class="doc"><p>A device that a node can be assigned to.
There's a naming convention where the device names
are constructed from job and replica names.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Device" class="def">Device</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:deviceName" class="def">deviceName</a> :: Text</dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr></table></div><div class="subs instances"><p id="control.i:Device" class="caption collapser" onclick="toggleSection('i:Device')">Instances</p><div id="section.i:Device" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Device:Eq:1" class="instance expander" onclick="toggleSection('i:id:Device:Eq:1')"></span> <a href="../base-4.10.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="TensorFlow-Core.html#t:Device">Device</a></span> <a href="src/TensorFlow.Output.html#line-74" class="link">Source</a> <a href="#t:Device" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Device:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Device:Ord:2" class="instance expander" onclick="toggleSection('i:id:Device:Ord:2')"></span> <a href="../base-4.10.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="TensorFlow-Core.html#t:Device">Device</a></span> <a href="src/TensorFlow.Output.html#line-74" class="link">Source</a> <a href="#t:Device" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Device:Ord:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; <a href="../base-4.10.1.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(&lt;)</a> :: <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(&lt;=)</a> :: <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(&gt;)</a> :: <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(&gt;=)</a> :: <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; <a href="TensorFlow-Core.html#t:Device">Device</a> <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt;
(unless further overridden by another use of withDevice).</p></div></div><div class="top"><p class="src"><a id="v:withNameScope" class="def">withNameScope</a> :: <a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> m =&gt; Text -&gt; m a -&gt; m a <a href="src/TensorFlow.Build.html#withNameScope" class="link">Source</a> <a href="#v:withNameScope" class="selflink">#</a></p><div class="doc"><p>Prepend a scope to all nodes rendered in the given <code><a href="TensorFlow-Core.html#t:Build">Build</a></code> action.</p></div></div><h2 id="g:9">Dependencies</h2><div class="top"><p class="src"><a id="v:withControlDependencies" class="def">withControlDependencies</a> :: (<a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> m, <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t) =&gt; t -&gt; m a -&gt; m a <a href="src/TensorFlow.ControlFlow.html#withControlDependencies" class="link">Source</a> <a href="#v:withControlDependencies" class="selflink">#</a></p><div class="doc"><p>Modify a <code><a href="TensorFlow-Core.html#t:Build">Build</a></code> action, such that all new ops rendered in it will depend
on the nodes in the first argument.</p></div></div><div class="top"><p class="src"><a id="v:group" class="def">group</a> :: (<a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> m, <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t) =&gt; t -&gt; m <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a> <a href="src/TensorFlow.ControlFlow.html#group" class="link">Source</a> <a href="#v:group" class="selflink">#</a></p><div class="doc"><p>Create an op that groups multiple operations.</p><p>When this op finishes, all ops in the input <code>n</code> have finished. This op has
no output.</p></div></div><h2 id="g:10">Misc</h2><div class="top"><p class="src"><a id="v:noOp" class="def">noOp</a> :: <a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> m =&gt; m <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a> <a href="src/TensorFlow.ControlFlow.html#noOp" class="link">Source</a> <a href="#v:noOp" class="selflink">#</a></p><div class="doc"><p>Does nothing. Only useful as a placeholder for control edges.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.18.1</p></div></body></html>