1
0
mirror of https://github.com/tensorflow/haskell.git synced 2024-06-02 02:53:35 +02:00
tensorflow-haskell/docs/haddock/tensorflow-0.3.0.0/TensorFlow-Core.html

48 lines
232 KiB
HTML
Raw Normal View History

<!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" /><meta name="viewport" content="width=device-width, initial-scale=1" /><title>TensorFlow.Core</title><link href="linuwial.css" rel="stylesheet" type="text/css" title="Linuwial" /><link rel="stylesheet" type="text/css" href="quick-jump.css" /><link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" /><script src="haddock-bundle.min.js" async="async" type="text/javascript"></script><script type="text/x-mathjax-config">MathJax.Hub.Config({ tex2jax: { processClass: "mathjax", ignoreClass: ".*" } });</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script></head><body><div id="package-header"><span class="caption">tensorflow-0.3.0.0: TensorFlow bindings.</span><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></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"><div id="contents-list"><p class="caption" onclick="window.scrollTo(0,0)">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><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"><details id="syn"><summary>Synopsis</summary><ul class="details-toggle" data-details-id="syn"><li class="src short"><span class="keyword">type</span> <a href="#t:Session">Session</a> = <a href="TensorFlow-Session.html#t:SessionT" title="TensorFlow.Session">SessionT</a> <a href="../base-4.13.0.0/System-IO.html#t:IO" title="System.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" title="TensorFlow.Core">Options</a> <a href="../tensorflow-proto-0.3.0.0/Proto-Tensorflow-Core-Protobuf-Config.html#t:ConfigProto" title="Proto.Tensorflow.Core.Protobuf.Config">ConfigProto</a></li><li class="src short"><a href="#v:sessionTarget">sessionTarget</a> :: Lens' <a href="TensorFlow-Core.html#t:Options" title="TensorFlow.Core">Options</a> <a href="../bytestring-0.10.10.1/Data-ByteString.html#t:ByteString" title="Data.ByteString">ByteString</a></li><li class="src short"><a href="#v:sessionTracer">sessionTracer</a> :: Lens' <a href="TensorFlow-Core.html#t:Options" title="TensorFlow.Core">Options</a> Tracer</li><li class="src short"><a href="#v:runSession">runSession</a> :: (MonadMask m, <a href="../base-4.13.0.0/Control-Monad-IO-Class.html#t:MonadIO" title="Control.Monad.IO.Class">MonadIO</a> m) =&gt; <a href="TensorFlow-Session.html#t:SessionT" title="TensorFlow.Session">SessionT</a> m a -&gt; m a</li><li class="src short"><a href="#v:runSessionWithOptions">runSessionWithOptions</a> :: (MonadMask m, <a href="../base-4.13.0.0/Control-Monad-IO-Class.html#t:MonadIO" title="Control.Monad.IO.Class">MonadIO</a> m) =&gt; <a href="TensorFlow-Core.html#t:Options" title="TensorFlow.Core">Options</a> -&gt; <a href="TensorFlow-Session.html#t:SessionT" title="TensorFlow.Session">SessionT</a> m a -&gt; m a</li><li class="src short"><span class="keyword">class</span> <a href="../base-4.13.0.0/Control-Monad.html#t:Monad" title="Control.Monad">Monad</a> m =&gt; <a href="#t:MonadBuild">MonadBuild</a> m <span class="keyword">where</span><ul class="subs"><li><a href="#v:build">build</a> :: <a href="TensorFlow-Core.html#t:Build" title="TensorFlow.Core">Build</a> a -&gt; m a</li></ul></li><li class="src short"><span class="keyword">class</span> <a href="TensorFlow-Core.html#t:Nodes" title="TensorFlow.Core">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.13.0.0/Control-Monad-IO-Class.html#t:MonadIO" title="Control.Monad.IO.Class">MonadIO</a> m, <a href="TensorFlow-Core.html#t:Fetchable" title="TensorFlow.Core">Fetchable</a> t a) =&gt; t -&gt; <a href="TensorFlow-Session.html#t:SessionT" title="TensorFlow.Session">SessionT</a> m a</li><li class="src short"><a href="#v:run_">run_</a> :: (<a href="../base-4.13.0.0/Control-Monad-IO-Class.html#t:MonadIO" title="Control.Monad.IO.Class">MonadIO</a> m, <a href="TensorFlow-Core.html#t:Nodes" title="TensorFlow.Core">Nodes</a> t) =&gt; t -&gt; <a href="TensorFlow-Session.html#t:SessionT" title="TensorFlow.Session">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" title="TensorFlow.Tensor">Rendered</a> t =&gt; t a -&gt; <a href="TensorFlow-Core.html#t:TensorData" title="TensorFlow.Core">TensorData</a> a -&gt; <a href="TensorFlow-Core.html#t:Feed" title="TensorFlow.Core">Feed</a></li><li class="src short"><a href="#v:runWithFeeds">runWithFeeds</a> :: (<a href="../base-4.13.0.0/Control-Monad-IO-Class.html#t:MonadIO" title="Control.Monad.IO.Class">MonadIO</a> m, <a href="TensorFlow-Core.html#t:Fetchable" title="TensorFlow.Core">Fetchable</a> t a) =&gt; [<a href="TensorFlow-Core.html#t:Feed" title="TensorFlow.Core">Feed</a>] -&gt; t -&gt; <a href="TensorFlow-Session.html#t:SessionT" ti
<code><a href="TensorFlow-Core.html#v:sessionTarget" title="TensorFlow.Core">sessionTarget</a></code>, <code><a href="TensorFlow-Core.html#v:sessionTracer" title="TensorFlow.Core">sessionTracer</a></code>, <code><a href="TensorFlow-Core.html#v:sessionConfig" title="TensorFlow.Core">sessionConfig</a></code>.</p></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:Options">Instances</h4><details id="i:Options" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Options:Default:1"></span> Default <a href="TensorFlow-Core.html#t:Options" title="TensorFlow.Core">Options</a></span> <a href="src/TensorFlow.Session.html#line-100" class="link">Source</a> <a href="#t:Options" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Options:Default:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Session.html">TensorFlow.Session</a></p> <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" title="TensorFlow.Core">Options</a></p></div></details></td></tr></table></details></div></div><div class="top"><p class="src"><a id="v:sessionConfig" class="def">sessionConfig</a> :: Lens' <a href="TensorFlow-Core.html#t:Options" title="TensorFlow.Core">Options</a> <a href="../tensorflow-proto-0.3.0.0/Proto-Tensorflow-Core-Protobuf-Config.html#t:ConfigProto" title="Proto.Tensorflow.Core.Protobuf.Config">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" title="TensorFlow.Core">Options</a> <a href="../bytestring-0.10.10.1/Data-ByteString.html#t:ByteString" title="Data.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" title="TensorFlow.Core">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.13.0.0/Control-Monad-IO-Class.html#t:MonadIO" title="Control.Monad.IO.Class">MonadIO</a> m) =&gt; <a href="TensorFlow-Session.html#t:SessionT" title="TensorFlow.Session">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" title="TensorFlow.Core">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.13.0.0/Control-Monad-IO-Class.html#t:MonadIO" title="Control.Monad.IO.Class">MonadIO</a> m) =&gt; <a href="TensorFlow-Core.html#t:Options" title="TensorFlow.Core">Options</a> -&gt; <a href="TensorFlow-Session.html#t:SessionT" title="TensorFlow.Session">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" title="TensorFlow.Core">Session</a></code> actions in a new TensorFlow session created with
the given option setter actions (<code><a href="TensorFlow-Core.html#v:sessionTarget" title="TensorFlow.Core">sessionTarget</a></code>, <code><a href="TensorFlow-Core.html#v:sessionConfig" title="TensorFlow.Core">sessionConfig</a></code>).</p></div></div><a href="#g:2" id="g:2"><h2>Building graphs</h2></a><div class="top"><p class="src"><span class="keyword">class</span> <a href="../base-4.13.0.0/Control-Monad.html#t:Monad" title="Control.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" title="TensorFlow.Core">Build</a></code> action into a monad, including any explicit op renderings.</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" title="TensorFlow.Core">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"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:MonadBuild">Instances</h4><details id="i:MonadBuild" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:ic:MonadBuild:MonadBuild:1"></span> <a href="../base-4.13.0.0/Control-Monad.html#t:Monad" title="Control.Monad">Monad</a> m =&gt; <a href="TensorFlow-Core.html#t:MonadBuild" title="TensorFlow.Core">MonadBuild</a> (<a href="TensorFlow-Core.html#t:BuildT" title="TensorFlow.Core">BuildT</a> m)</span> <a href="src/TensorFlow.Build.html#line-212" class="link">Source</a> <a href="#t:MonadBuild" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:ic:MonadBuild:MonadBuild:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Build.html">TensorFlow.Build</a></p> <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" title="TensorFlow.Core">Build</a> a -&gt; <a href="TensorFlow-Core.html#t:BuildT" title="TensorFlow.Core">BuildT</a> m a <a href="src/TensorFlow.Build.html#build" class="link">Source</a> <a href="#v:build" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:ic:MonadBuild:MonadBuild:2"></span> <a href="../base-4.13.0.0/Control-Monad.html#t:Monad" title="Control.Monad">Monad</a> m =&gt; <a href="TensorFlow-Core.html#t:MonadBuild" title="TensorFlow.Core">MonadBuild</a> (<a href="TensorFlow-Session.html#t:SessionT" title="TensorFlow.Session">SessionT</a> m)</span> <a href="src/TensorFlow.Session.html#line-132" class="link">Source</a> <a href="#t:MonadBuild" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:ic:MonadBuild:MonadBuild:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Session.html">TensorFlow.Session</a></p> <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" title="TensorFlow.Core">Build</a> a -&gt; <a href="TensorFlow-Session.html#t:SessionT" title="TensorFlow.Session">SessionT</a> m a <a href="src/TensorFlow.Build.html#build" class="link">Source</a> <a href="#v:build" class="selflink">#</a></p></div></details></td></tr></table></details></div></div><a href="#g:3" id="g:3"><h2>Running graphs</h2></a><div class="top"><p class="src"><span class="keyword">class</span> <a href="TensorFlow-Core.html#t:Nodes" title="TensorFlow.Core">Nodes</a> t =&gt; <a id="t:Fetchable" class="def">Fetchable</a> t a
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" title="TensorFlow.Nodes">getFetch</a></p></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:Fetchable">Instances</h4><details id="i:Fetchable" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:ic:Fetchable:Fetchable:1"></span> a ~ () =&gt; <a href="TensorFlow-Core.html#t:Fetchable" title="TensorFlow.Core">Fetchable</a> <a href="TensorFlow-Core.html#t:ControlNode" title="TensorFlow.Core">ControlNode</a> a</span> <a href="src/TensorFlow.Nodes.html#line-104" class="link">Source</a> <a href="#t:Fetchable" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:ic:Fetchable:Fetchable:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Nodes.html">TensorFlow.Nodes</a></p> <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" title="TensorFlow.Core">ControlNode</a> -&gt; <a href="TensorFlow-Core.html#t:Build" title="TensorFlow.Core">Build</a> (<a href="TensorFlow-Nodes.html#t:Fetch" title="TensorFlow.Nodes">Fetch</a> a) <a href="src/TensorFlow.Nodes.html#getFetch" class="link">Source</a> <a href="#v:getFetch" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:ic:Fetchable:Fetchable:2"></span> <a href="TensorFlow-Core.html#t:Fetchable" title="TensorFlow.Core">Fetchable</a> t a =&gt; <a href="TensorFlow-Core.html#t:Fetchable" title="TensorFlow.Core">Fetchable</a> [t] [a]</span> <a href="src/TensorFlow.Nodes.html#line-88" class="link">Source</a> <a href="#t:Fetchable" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:ic:Fetchable:Fetchable:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Nodes.html">TensorFlow.Nodes</a></p> <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" title="TensorFlow.Core">Build</a> (<a href="TensorFlow-Nodes.html#t:Fetch" title="TensorFlow.Nodes">Fetch</a> [a]) <a href="src/TensorFlow.Nodes.html#getFetch" class="link">Source</a> <a href="#v:getFetch" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:ic:Fetchable:Fetchable:3"></span> <a href="TensorFlow-Core.html#t:Fetchable" title="TensorFlow.Core">Fetchable</a> t a =&gt; <a href="TensorFlow-Core.html#t:Fetchable" title="TensorFlow.Core">Fetchable</a> (<a href="../base-4.13.0.0/Data-Maybe.html#t:Maybe" title="Data.Maybe">Maybe</a> t) (<a href="../base-4.13.0.0/Data-Maybe.html#t:Maybe" title="Data.Maybe">Maybe</a> a)</span> <a href="src/TensorFlow.Nodes.html#line-94" class="link">Source</a> <a href="#t:Fetchable" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:ic:Fetchable:Fetchable:3"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Nodes.html">TensorFlow.Nodes</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:getFetch">getFetch</a> :: <a href="../base-4.13.0.0/Data-Maybe.html#t:Maybe" title="Data.Maybe">Maybe</a> t -&gt; <a href="TensorFlow-Core.html#t:Build" title="TensorFlow.Core">Build</a> (<a href="TensorFlow-Nodes.html#t:Fetch" title="TensorFlow.Nodes">Fetch</a> (<a href="../base-4.13.0.0/Data-Maybe.html#t:Maybe" title=
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.13.0.0/Control-Monad-IO-Class.html#t:MonadIO" title="Control.Monad.IO.Class">MonadIO</a> m, <a href="TensorFlow-Core.html#t:Nodes" title="TensorFlow.Core">Nodes</a> t) =&gt; t -&gt; <a href="TensorFlow-Session.html#t:SessionT" title="TensorFlow.Session">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" title="TensorFlow.Core">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" title="TensorFlow.Core">Tensor</a></code> and some data that should be fed into that <code><a href="TensorFlow-Core.html#t:Tensor" title="TensorFlow.Core">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" title="TensorFlow.Tensor">Rendered</a> t =&gt; t a -&gt; <a href="TensorFlow-Core.html#t:TensorData" title="TensorFlow.Core">TensorData</a> a -&gt; <a href="TensorFlow-Core.html#t:Feed" title="TensorFlow.Core">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" title="TensorFlow.Core">Feed</a></code> for feeding the given data into a <code><a href="TensorFlow-Core.html#t:Tensor" title="TensorFlow.Core">Tensor</a></code> when running
the graph.</p><p>Note that if a <code><a href="TensorFlow-Core.html#t:Tensor" title="TensorFlow.Core">Tensor</a></code> is rendered, its identity may change; so feeding the
rendered <code><a href="TensorFlow-Core.html#t:Tensor" title="TensorFlow.Core">Tensor</a></code> may be different than feeding the original <code><a href="TensorFlow-Core.html#t:Tensor" title="TensorFlow.Core">Tensor</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:runWithFeeds" class="def">runWithFeeds</a> :: (<a href="../base-4.13.0.0/Control-Monad-IO-Class.html#t:MonadIO" title="Control.Monad.IO.Class">MonadIO</a> m, <a href="TensorFlow-Core.html#t:Fetchable" title="TensorFlow.Core">Fetchable</a> t a) =&gt; [<a href="TensorFlow-Core.html#t:Feed" title="TensorFlow.Core">Feed</a>] -&gt; t -&gt; <a href="TensorFlow-Session.html#t:SessionT" title="TensorFlow.Session">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.13.0.0/Control-Monad-IO-Class.html#t:MonadIO" title="Control.Monad.IO.Class">MonadIO</a> m, <a href="TensorFlow-Core.html#t:Nodes" title="TensorFlow.Core">Nodes</a> t) =&gt; [<a href="TensorFlow-Core.html#t:Feed" title="TensorFlow.Core">Feed</a>] -&gt; t -&gt; <a href="TensorFlow-Session.html#t:SessionT" title="TensorFlow.Session">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" title="TensorFlow.Core">runWithFeeds</a></code> except that it doesn't do
any fetches.</p></div></div><a href="#g:4" id="g:4"><h2>Async</h2></a><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.13.0.0/Control-Monad-IO-Class.html#t:MonadIO" title="Control.Monad.IO.Class">MonadIO</a> m, <a href="TensorFlow-Core.html#t:Nodes" title="TensorFlow.Core">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" title="TensorFlow.Session">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><a href="#g:5" id="g:5"><h1>Build</h1></a><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" title="TensorFlow.Core">BuildT</a> <a href="../base-4.13.0.0/Data-Functor-Identity.html#t:Identity" title="Data.Functor.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"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:BuildT">Instances</h4><details id="i:BuildT" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:BuildT:MonadTrans:1"></span> <a href="../transformers-0.5.6.2/Control-Monad-Trans-Class.html#t:MonadTrans" title="Control.Monad.Trans.Class">MonadTrans</a> <a href="TensorFlow-Core.html#t:BuildT" title="TensorFlow.Core">BuildT</a></span> <a href="src/TensorFlow.Build.html#line-191" class="link">Source</a> <a href="#t:BuildT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:BuildT:MonadTrans:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Build.html">TensorFlow.Build</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:lift">lift</a> :: <a href="../base-4.13.0.0/Control-Monad.html#t:Monad" title="Control.Monad">Monad</a> m =&gt; m a -&gt; <a href="TensorFlow-Core.html#t:BuildT" title="TensorFlow.Core">BuildT</a> m a <a href="#v:lift" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:BuildT:TensorKind:2"></span> <a href="TensorFlow-Tensor.html#t:TensorKind" title="TensorFlow.Tensor">TensorKind</a> <a href="TensorFlow-Core.html#t:Build" title="TensorFlow.Core">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"><details id="i:id:BuildT:TensorKind:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Tensor.html">TensorFlow.Tensor</a></p> <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" title="TensorFlow.Core">Build</a> a -&gt; <a href="TensorFlow-Core.html#t:Build" title="TensorFlow.Core">Build</a> a <a href="src/TensorFlow.Tensor.html#toBuild" class="link">Source</a> <a href="#v:toBuild" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:BuildT:MonadState:3"></span> <a href="../base-4.13.0.0/Control-Monad.html#t:Monad" title="Control.Monad">Monad</a> m =&gt; <a href="../mtl-2.2.2/Control-Monad-State-Class.html#t:MonadState" title="Control.Monad.State.Class">MonadState</a> <a href="TensorFlow-Build.html#t:GraphState" title="TensorFlow.Build">GraphState</a> (<a href="TensorFlow-Core.html#t:BuildT" title="TensorFlow.Core">BuildT</a> m)</span> <a href="src/TensorFlow.Build.html#line-192" class="link">Source</a> <a href="#t:BuildT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:BuildT:MonadState:3"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Build.html">TensorFlow.Build</a></p> <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" title="TensorFlow.Core">BuildT</a> m <a href="TensorFlow-Build.html#t:GraphState" title="TensorFlow.Build">GraphState</a> <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: <a href="TensorFlow-Build.html#t:GraphState" title="TensorFlow.Build">GraphState</a> -&gt; <a href="TensorFlow-Core.html#t:BuildT" title="TensorFlow.Core">BuildT</a> m () <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:state">state</a> :: (<a href="TensorFlow-Build.html#t:GraphState" title="TensorFlow.Build">GraphState</a> -&gt; (a, <a
the <code><a href="TensorFlow-Core.html#t:MonadBuild" title="TensorFlow.Core">MonadBuild</a></code> context. Also renders any dependencies of the <code><a href="TensorFlow-Core.html#t:Tensor" title="TensorFlow.Core">Tensor</a></code> that
weren't already rendered.</p><p>This operation is idempotent; calling <code><a href="TensorFlow-Core.html#v:render" title="TensorFlow.Core">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" title="TensorFlow.Core">Build</a> a -&gt; <a href="../tensorflow-proto-0.3.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef" title="Proto.Tensorflow.Core.Framework.Graph">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" title="TensorFlow.Core">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" title="TensorFlow.Core">MonadBuild</a> m =&gt; <a href="../tensorflow-proto-0.3.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef" title="Proto.Tensorflow.Core.Framework.Graph">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" title="TensorFlow.Output">OpDef</a> <a href="TensorFlow-Output.html#t:PendingNodeName" title="TensorFlow.Output">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" title="TensorFlow.Types">Attribute</a> a =&gt; <a href="../text-1.2.4.0/Data-Text.html#t:Text" title="Data.Text">Text</a> -&gt; Lens' <a href="TensorFlow-Output.html#t:OpDef" title="TensorFlow.Output">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" title="TensorFlow.Core">MonadBuild</a> m =&gt; <a href="TensorFlow-Core.html#t:ControlNode" title="TensorFlow.Core">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" title="TensorFlow.Session">run</a></code>.</p></div></div><a href="#g:6" id="g:6"><h1>Tensor</h1></a><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"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:ControlNode">Instances</h4><details id="i:ControlNode" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:ControlNode:Nodes:1"></span> <a href="TensorFlow-Core.html#t:Nodes" title="TensorFlow.Core">Nodes</a> <a href="TensorFlow-Core.html#t:ControlNode" title="TensorFlow.Core">ControlNode</a></span> <a href="src/TensorFlow.Nodes.html#line-97" class="link">Source</a> <a href="#t:Nodes" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:ControlNode:Nodes:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Nodes.html">TensorFlow.Nodes</a></p> <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" title="TensorFlow.Core">ControlNode</a> -&gt; <a href="TensorFlow-Core.html#t:Build" title="TensorFlow.Core">Build</a> (<a href="../containers-0.6.2.1/Data-Set.html#t:Set" title="Data.Set">Set</a> <a href="TensorFlow-Output.html#t:NodeName" title="TensorFlow.Output">NodeName</a>) <a href="src/TensorFlow.Nodes.html#getNodes" class="link">Source</a> <a href="#v:getNodes" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:ControlNode:BuildResult:2"></span> <a href="TensorFlow-BuildOp.html#t:BuildResult" title="TensorFlow.BuildOp">BuildResult</a> <a href="TensorFlow-Core.html#t:ControlNode" title="TensorFlow.Core">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"><details id="i:id:ControlNode:BuildResult:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-BuildOp.html">TensorFlow.BuildOp</a></p> <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" title="TensorFlow.Core">ControlNode</a> <a href="src/TensorFlow.BuildOp.html#buildResult" class="link">Source</a> <a href="#v:buildResult" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:ControlNode:Fetchable:3"></span> a ~ () =&gt; <a href="TensorFlow-Core.html#t:Fetchable" title="TensorFlow.Core">Fetchable</a> <a href="TensorFlow-Core.html#t:ControlNode" title="TensorFlow.Core">ControlNode</a> a</span> <a href="src/TensorFlow.Nodes.html#line-104" class="link">Source</a> <a href="#t:Fetchable" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:ControlNode:Fetchable:3"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Nodes.html">TensorFlow.Nodes</a></p> <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" title="TensorFlow.Core">ControlNode</a> -&gt; <a href="TensorFlow-Core.html#t:Build" title="TensorFlow.Core">Build</a> (<a href="TensorFlow-Nodes.html#t:Fetch" title="TensorFlow.Nodes">Fetch</a> a) <a href="src/TensorFlow.Nodes.html#getFetch" class="link">Source</a> <a href="#v:getFetch" class="selflink">#</a></p></div></details></td></tr></table></details></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">#</
parameter <code>v</code> is either:</p><ul><li><code><a href="TensorFlow-Core.html#t:Build" title="TensorFlow.Core">Build</a></code>: An unrendered, immutable value.</li><li><code><a href="TensorFlow-Core.html#t:Value" title="TensorFlow.Core">Value</a></code>: A rendered, immutable value.</li><li><code><a href="TensorFlow-Core.html#t:Ref" title="TensorFlow.Core">Ref</a></code>: A rendered stateful handle (e.g., a variable).</li></ul><p>Note that <code><a href="TensorFlow-Core.html#v:expr" title="TensorFlow.Core">expr</a></code>, <code><a href="TensorFlow-Core.html#v:value" title="TensorFlow.Core">value</a></code>, <code><a href="TensorFlow-Core.html#v:render" title="TensorFlow.Core">render</a></code> and <code><a href="TensorFlow-Tensor.html#v:renderValue" title="TensorFlow.Tensor">renderValue</a></code> can help convert between
the different types of <code><a href="TensorFlow-Core.html#t:Tensor" title="TensorFlow.Core">Tensor</a></code>.</p></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:Tensor">Instances</h4><details id="i:Tensor" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Tensor:ToTensor:1"></span> <a href="TensorFlow-Tensor.html#t:TensorKind" title="TensorFlow.Tensor">TensorKind</a> v =&gt; <a href="TensorFlow-Tensor.html#t:ToTensor" title="TensorFlow.Tensor">ToTensor</a> (<a href="TensorFlow-Core.html#t:Tensor" title="TensorFlow.Core">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"><details id="i:id:Tensor:ToTensor:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Tensor.html">TensorFlow.Tensor</a></p> <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" title="TensorFlow.Core">TensorType</a> a =&gt; <a href="TensorFlow-Core.html#t:Tensor" title="TensorFlow.Core">Tensor</a> v a -&gt; <a href="TensorFlow-Core.html#t:Tensor" title="TensorFlow.Core">Tensor</a> <a href="TensorFlow-Core.html#t:Build" title="TensorFlow.Core">Build</a> a <a href="src/TensorFlow.Tensor.html#toTensor" class="link">Source</a> <a href="#v:toTensor" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Tensor:Rendered:2"></span> <a href="TensorFlow-Tensor.html#t:Rendered" title="TensorFlow.Tensor">Rendered</a> (<a href="TensorFlow-Core.html#t:Tensor" title="TensorFlow.Core">Tensor</a> <a href="TensorFlow-Core.html#t:Ref" title="TensorFlow.Core">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"><details id="i:id:Tensor:Rendered:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Tensor.html">TensorFlow.Tensor</a></p> <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" title="TensorFlow.Core">Tensor</a> <a href="TensorFlow-Core.html#t:Ref" title="TensorFlow.Core">Ref</a> a -&gt; <a href="TensorFlow-Output.html#t:Output" title="TensorFlow.Output">Output</a> <a href="src/TensorFlow.Tensor.html#renderedOutput" class="link">Source</a> <a href="#v:renderedOutput" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Tensor:Rendered:3"></span> <a href="TensorFlow-Tensor.html#t:Rendered" title="TensorFlow.Tensor">Rendered</a> (<a href="TensorFlow-Core.html#t:Tensor" title="TensorFlow.Core">Tensor</a> <a href="TensorFlow-Core.html#t:Value" title="TensorFlow.Core">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"><details id="i:id:Tensor:Rendered:3"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Tensor.html">TensorFlow.Tensor</a></p> <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" title="TensorFlow.Core">Tensor</a> <a href="TensorFlow-Core.html#t:Value" title="TensorFlow.Core">Value</a> a -&gt; <a href="TensorFlow-Output.html#t:Output" title="TensorFlow.Output">Output</a> <a href="src/Tensor
in a <code>GraphDef</code> that was loaded via <code><a href="TensorFlow-Core.html#v:addGraphDef" title="TensorFlow.Core">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" title="TensorFlow.Tensor">TensorKind</a> v =&gt; <a href="TensorFlow-Core.html#t:Tensor" title="TensorFlow.Core">Tensor</a> v a -&gt; <a href="TensorFlow-Core.html#t:Tensor" title="TensorFlow.Core">Tensor</a> <a href="TensorFlow-Core.html#t:Build" title="TensorFlow.Core">Build</a> a <a href="src/TensorFlow.Tensor.html#expr" class="link">Source</a> <a href="#v:expr" class="selflink">#</a></p></div><a href="#g:7" id="g:7"><h2>Element types</h2></a><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" title="TensorFlow.Types">tensorType</a>, <a href="TensorFlow-Types.html#v:tensorRefType" title="TensorFlow.Types">tensorRefType</a>, <a href="TensorFlow-Types.html#v:tensorVal" title="TensorFlow.Types">tensorVal</a></p></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:TensorType">Instances</h4><details id="i:TensorType" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:ic:TensorType:TensorType:1"></span> <a href="TensorFlow-Core.html#t:TensorType" title="TensorFlow.Core">TensorType</a> <a href="../base-4.13.0.0/Data-Bool.html#t:Bool" title="Data.Bool">Bool</a></span> <a href="src/TensorFlow.Types.html#line-203" class="link">Source</a> <a href="#t:TensorType" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:ic:TensorType:TensorType:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Types.html">TensorFlow.Types</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:tensorType">tensorType</a> :: <a href="../base-4.13.0.0/Data-Bool.html#t:Bool" title="Data.Bool">Bool</a> -&gt; <a href="TensorFlow-Types.html#t:DataType" title="TensorFlow.Types">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.13.0.0/Data-Bool.html#t:Bool" title="Data.Bool">Bool</a> -&gt; <a href="TensorFlow-Types.html#t:DataType" title="TensorFlow.Types">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.3.0.0/Proto-Tensorflow-Core-Framework-Tensor.html#t:TensorProto" title="Proto.Tensorflow.Core.Framework.Tensor">TensorProto</a> [<a href="../base-4.13.0.0/Data-Bool.html#t:Bool" title="Data.Bool">Bool</a>] <a href="src/TensorFlow.Types.html#tensorVal" class="link">Source</a> <a href="#v:tensorVal" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:ic:TensorType:TensorType:2"></span> <a href="TensorFlow-Core.html#t:TensorType" title="TensorFlow.Core">TensorType</a> <a href="../base-4.13.0.0/Prelude.html#t:Double" title="Prelude">Double</a></span> <a href="src/TensorFlow.Types.html#line-150" class="link">Source</a> <a href="#t:TensorType" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:ic:TensorType:TensorType:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-T
element 1: index (0, ..., 1)
...</p></div></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:TensorDataType">Instances</h4><details id="i:TensorDataType" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:ic:TensorDataType:TensorDataType:1"></span> <a href="TensorFlow-Core.html#t:TensorDataType" title="TensorFlow.Core">TensorDataType</a> Vector <a href="../base-4.13.0.0/Data-Bool.html#t:Bool" title="Data.Bool">Bool</a></span> <a href="src/TensorFlow.Types.html#line-298" class="link">Source</a> <a href="#t:TensorDataType" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:ic:TensorDataType:TensorDataType:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Types.html">TensorFlow.Types</a></p> <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" title="TensorFlow.Core">TensorData</a> <a href="../base-4.13.0.0/Data-Bool.html#t:Bool" title="Data.Bool">Bool</a> -&gt; Vector <a href="../base-4.13.0.0/Data-Bool.html#t:Bool" title="Data.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" title="TensorFlow.Core">Shape</a> -&gt; Vector <a href="../base-4.13.0.0/Data-Bool.html#t:Bool" title="Data.Bool">Bool</a> -&gt; <a href="TensorFlow-Core.html#t:TensorData" title="TensorFlow.Core">TensorData</a> <a href="../base-4.13.0.0/Data-Bool.html#t:Bool" title="Data.Bool">Bool</a> <a href="src/TensorFlow.Types.html#encodeTensorData" class="link">Source</a> <a href="#v:encodeTensorData" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:ic:TensorDataType:TensorDataType:2"></span> <a href="TensorFlow-Core.html#t:TensorDataType" title="TensorFlow.Core">TensorDataType</a> Vector <a href="../base-4.13.0.0/Prelude.html#t:Double" title="Prelude">Double</a></span> <a href="src/TensorFlow.Types.html#line-268" class="link">Source</a> <a href="#t:TensorDataType" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:ic:TensorDataType:TensorDataType:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Types.html">TensorFlow.Types</a></p> <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" title="TensorFlow.Core">TensorData</a> <a href="../base-4.13.0.0/Prelude.html#t:Double" title="Prelude">Double</a> -&gt; Vector <a href="../base-4.13.0.0/Prelude.html#t:Double" title="Prelude">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" title="TensorFlow.Core">Shape</a> -&gt; Vector <a href="../base-4.13.0.0/Prelude.html#t:Double" title="Prelude">Double</a> -&gt; <a href="TensorFlow-Core.html#t:TensorData" title="TensorFlow.Core">TensorData</a> <a href="../base-4.13.0.0/Prelude.html#t:Double" title="Prelude">Double</a> <a href="src/TensorFlow.Types.html#encodeTensorData" class="link">Source</a> <a href="#v:encodeTensorData" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:ic:TensorDataType:TensorDataType:3"></span> <a href="TensorFlow-Core.html#t:TensorDataType" title="TensorFlow.Core
<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.13.0.0/Data-Int.html#t:Int64" title="Data.Int">Int64</a>]</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:Shape">Instances</h4><details id="i:Shape" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Shape:IsList:1"></span> <a href="../base-4.13.0.0/GHC-Exts.html#t:IsList" title="GHC.Exts">IsList</a> <a href="TensorFlow-Core.html#t:Shape" title="TensorFlow.Core">Shape</a></span> <a href="src/TensorFlow.Types.html#line-391" class="link">Source</a> <a href="#t:Shape" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Shape:IsList:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Types.html">TensorFlow.Types</a></p> <div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="../base-4.13.0.0/GHC-Exts.html#t:Item" title="GHC.Exts">Item</a> <a href="TensorFlow-Core.html#t:Shape" title="TensorFlow.Core">Shape</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.13.0.0/GHC-Exts.html#t:Item" title="GHC.Exts">Item</a> <a href="TensorFlow-Core.html#t:Shape" title="TensorFlow.Core">Shape</a>] -&gt; <a href="TensorFlow-Core.html#t:Shape" title="TensorFlow.Core">Shape</a> <a href="#v:fromList" class="selflink">#</a></p><p class="src"><a href="#v:fromListN">fromListN</a> :: <a href="../base-4.13.0.0/Data-Int.html#t:Int" title="Data.Int">Int</a> -&gt; [<a href="../base-4.13.0.0/GHC-Exts.html#t:Item" title="GHC.Exts">Item</a> <a href="TensorFlow-Core.html#t:Shape" title="TensorFlow.Core">Shape</a>] -&gt; <a href="TensorFlow-Core.html#t:Shape" title="TensorFlow.Core">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" title="TensorFlow.Core">Shape</a> -&gt; [<a href="../base-4.13.0.0/GHC-Exts.html#t:Item" title="GHC.Exts">Item</a> <a href="TensorFlow-Core.html#t:Shape" title="TensorFlow.Core">Shape</a>] <a href="#v:toList" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Shape:Show:2"></span> <a href="../base-4.13.0.0/Text-Show.html#t:Show" title="Text.Show">Show</a> <a href="TensorFlow-Core.html#t:Shape" title="TensorFlow.Core">Shape</a></span> <a href="src/TensorFlow.Types.html#line-389" class="link">Source</a> <a href="#t:Shape" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Shape:Show:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Types.html">TensorFlow.Types</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="../base-4.13.0.0/Data-Int.html#t:Int" title="Data.Int">Int</a> -&gt; <a href="TensorFlow-Core.html#t:Shape" title="TensorFlow.Core">Shape</a> -&gt; <a href="../base-4.13.0.0/Text-Show.html#t:ShowS" title="Text.Show">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" title="TensorFlow.Core">Shape</a> -&gt; <a href="../base-4.13.0.0/Data-String.html#t:String" title="Data.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" title="TensorFlow.C
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" title="TensorFlow.Core">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.13.0.0/Data-Kind.html#t:Constraint" title="Data.Kind">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-" title="TensorFlow.Core">/=</a> a = <a href="TensorFlow-Types.html#t:TypeError" title="TensorFlow.Types">TypeError</a> a ~ <a href="TensorFlow-Types.html#t:ExcludedCase" title="TensorFlow.Types">ExcludedCase</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">a <a href="TensorFlow-Core.html#t:-47--61-" title="TensorFlow.Core">/=</a> b = ()</td><td class="doc empty">&nbsp;</td></tr></table></div></div><a href="#g:8" id="g:8"><h1>Op combinators</h1></a><div class="top"><p class="src"><a id="v:colocateWith" class="def">colocateWith</a> :: (<a href="TensorFlow-Core.html#t:MonadBuild" title="TensorFlow.Core">MonadBuild</a> m, <a href="TensorFlow-Tensor.html#t:Rendered" title="TensorFlow.Tensor">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" title="TensorFlow.Core">Build</a></code> action on the same
device as the given Tensor (see also <code><a href="TensorFlow-Core.html#v:withDevice" title="TensorFlow.Core">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> :: <a href="../text-1.2.4.0/Data-Text.html#t:Text" title="Data.Text">Text</a></dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr></table></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:Device">Instances</h4><details id="i:Device" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Device:Eq:1"></span> <a href="../base-4.13.0.0/Data-Eq.html#t:Eq" title="Data.Eq">Eq</a> <a href="TensorFlow-Core.html#t:Device" title="TensorFlow.Core">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"><details id="i:id:Device:Eq:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Output.html">TensorFlow.Output</a></p> <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" title="TensorFlow.Core">Device</a> -&gt; <a href="TensorFlow-Core.html#t:Device" title="TensorFlow.Core">Device</a> -&gt; <a href="../base-4.13.0.0/Data-Bool.html#t:Bool" title="Data.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" title="TensorFlow.Core">Device</a> -&gt; <a href="TensorFlow-Core.html#t:Device" title="TensorFlow.Core">Device</a> -&gt; <a href="../base-4.13.0.0/Data-Bool.html#t:Bool" title="Data.Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Device:Ord:2"></span> <a href="../base-4.13.0.0/Data-Ord.html#t:Ord" title="Data.Ord">Ord</a> <a href="TensorFlow-Core.html#t:Device" title="TensorFlow.Core">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"><details id="i:id:Device:Ord:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Output.html">TensorFlow.Output</a></p> <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" title="TensorFlow.Core">Device</a> -&gt; <a href="TensorFlow-Core.html#t:Device" title="TensorFlow.Core">Device</a> -&gt; <a href="../base-4.13.0.0/Data-Ord.html#t:Ordering" title="Data.Ord">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" title="TensorFlow.Core">Device</a> -&gt; <a href="TensorFlow-Core.html#t:Device" title="TensorFlow.Core">Device</a> -&gt; <a href="../base-4.13.0.0/Data-Bool.html#t:Bool" title="Data.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" title="TensorFlow.Core">Device</a> -&gt; <a href="TensorFlow-Core.html#t:Device" title="TensorFlow.Core">Device</a> -&gt; <a href="../base-4.13.0.0/Data-Bool.html#t:Bool" title="Data.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" title="TensorFlow.Core">Device</a> -&gt; <a href="TensorFlow-Core.html#t:Device" title="TensorFlow.Core">Device</a> -
(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" title="TensorFlow.Core">MonadBuild</a> m =&gt; <a href="../text-1.2.4.0/Data-Text.html#t:Text" title="Data.Text">Text</a> -&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" title="TensorFlow.Core">Build</a></code> action.</p></div></div><a href="#g:9" id="g:9"><h2>Dependencies</h2></a><div class="top"><p class="src"><a id="v:withControlDependencies" class="def">withControlDependencies</a> :: (<a href="TensorFlow-Core.html#t:MonadBuild" title="TensorFlow.Core">MonadBuild</a> m, <a href="TensorFlow-Core.html#t:Nodes" title="TensorFlow.Core">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" title="TensorFlow.Core">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" title="TensorFlow.Core">MonadBuild</a> m, <a href="TensorFlow-Core.html#t:Nodes" title="TensorFlow.Core">Nodes</a> t) =&gt; t -&gt; m <a href="TensorFlow-Core.html#t:ControlNode" title="TensorFlow.Core">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><a href="#g:10" id="g:10"><h2>Misc</h2></a><div class="top"><p class="src"><a id="v:noOp" class="def">noOp</a> :: <a href="TensorFlow-Core.html#t:MonadBuild" title="TensorFlow.Core">MonadBuild</a> m =&gt; m <a href="TensorFlow-Core.html#t:ControlNode" title="TensorFlow.Core">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.23.0</p></div></body></html>