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.1.0.0/TensorFlow-Core.html
2017-04-08 07:14:47 -07:00

49 lines
63 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>TensorFlow.Core</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_TensorFlow-Core.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">tensorflow-0.1.0.0: TensorFlow bindings.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">TensorFlow.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">data</span> <a href="#t:Session">Session</a> 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.1.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.6.0/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> :: <a href="TensorFlow-Core.html#t:Session">Session</a> a -&gt; <a href="../base-4.8.2.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:runSessionWithOptions">runSessionWithOptions</a> :: <a href="TensorFlow-Core.html#t:Options">Options</a> -&gt; <a href="TensorFlow-Core.html#t:Session">Session</a> a -&gt; <a href="../base-4.8.2.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><span class="keyword">class</span> <a href="../base-4.8.2.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"><li><a href="#v:build">build</a> :: <a href="TensorFlow-Core.html#t:Build">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">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="TensorFlow-Core.html#t:Fetchable">Fetchable</a> t a =&gt; t -&gt; <a href="TensorFlow-Core.html#t:Session">Session</a> a</li><li class="src short"><a href="#v:run_">run_</a> :: <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t =&gt; t -&gt; <a href="TensorFlow-Core.html#t:Session">Session</a> ()</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> v =&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v 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="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-Core.html#t:Session">Session</a> a</li><li class="src short"><a href="#v:runWithFeeds_">runWithFeeds_</a> :: <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-Core.html#t:Session">Session</a> ()</li><li class="src short"><a href="#v:asyncProdNodes">asyncProdNodes</a> :: <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t =&gt; t -&gt; <a href="TensorFlow-Core.html#t:Session">Session</a> ()</li><li class="src short"><span class="keyword">type</span> <a href="#t:Build">Build</a> = <a href="TensorFlow-Core.html#t:BuildT">BuildT</a> <a href="../base-4.8.2.0/Data-Functor-Identity.html#t:Identity">Identity</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:BuildT">BuildT</a> m a</li><li class="src short"><a href="#v:render">render</a> :: <a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> m =&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; m (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Value">Value</a> a)</li><li class="src short"><a href="#v:asGraphDef">asGraphDef</a> :: <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; <a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef">GraphDef</a></li><li class="src short"><a href="#v:addGraphDef">addGraphDef</a> :: <a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> m =&gt; <a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef">GraphDef</a> -&gt; m ()</li><li class="src short"><a href="#v:opName">opName</a> :: Lens' <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> <a href="TensorFlow-Output.html#t:PendingNodeName">PendingNodeName</a></li><li class="src short"><a href="#v:opAttr">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</li><li class="src short"><span class="keyword">data</span> <a href="#t:ControlNode">ControlNode</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Tensor">Tensor</a> v a</li><li class="src short"><span class="keyword">data</span> <a href="#t:Value">Value</a> a</li><li class="src short"><span class="keyword">data</span> <a href="#t:Ref">Ref</a> a</li><li class="src short"><a href="#v:value">value</a> :: <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Ref">Ref</a> a -&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Value">Value</a> a</li><li class="src short"><a href="#v:tensorFromName">tensorFromName</a> :: <a href="TensorFlow-Tensor.html#t:TensorKind">TensorKind</a> v =&gt; Text -&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a</li><li class="src short"><a href="#v:expr">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</li><li class="src short"><span class="keyword">class</span> <a href="#t:TensorType">TensorType</a> a</li><li class="src short"><span class="keyword">data</span> <a href="#t:TensorData">TensorData</a> a</li><li class="src short"><span class="keyword">class</span> <a href="TensorFlow-Core.html#t:TensorType">TensorType</a> a =&gt; <a href="#t:TensorDataType">TensorDataType</a> s a <span class="keyword">where</span><ul class="subs"><li><a href="#v:decodeTensorData">decodeTensorData</a> :: <a href="TensorFlow-Core.html#t:TensorData">TensorData</a> a -&gt; s a</li><li><a href="#v:encodeTensorData">encodeTensorData</a> :: <a href="TensorFlow-Core.html#t:Shape">Shape</a> -&gt; s a -&gt; <a href="TensorFlow-Core.html#t:TensorData">TensorData</a> a</li></ul></li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Scalar">Scalar</a> a = <a href="#v:Scalar">Scalar</a> {<ul class="subs"><li><a href="#v:unScalar">unScalar</a> :: a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Shape">Shape</a> = <a href="#v:Shape">Shape</a> [<a href="../base-4.8.2.0/Data-Int.html#t:Int64">Int64</a>]</li><li class="src short"><span class="keyword">type</span> <a href="#t:OneOf">OneOf</a> ts a = (<a href="TensorFlow-Core.html#t:TensorType">TensorType</a> a, <a href="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a> ts, <a href="TensorFlow-Types.html#t:NoneOf">NoneOf</a> (<a href="TensorFlow-Types.html#t:AllTensorTypes">AllTensorTypes</a> <a href="TensorFlow-Types.html#t:-92--92-">\\</a> ts) a)</li><li class="src short"><span class="keyword">type family</span> a <a href="#t:-47--61-">/=</a> b :: <a href="../base-4.8.2.0/GHC-Exts.html#t:Constraint">Constraint</a></li><li class="src short"><a href="#v:colocateWith">colocateWith</a> :: (<a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> m, <a href="TensorFlow-Tensor.html#t:Rendered">Rendered</a> v) =&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v b -&gt; m a -&gt; m a</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Device">Device</a> = <a href="#v:Device">Device</a> {<ul class="subs"><li><a href="#v:deviceName">deviceName</a> :: Text</li></ul>}</li><li class="src short"><a href="#v:withDevice">withDevice</a> :: <a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> m =&gt; <a href="../base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; m a -&gt; m a</li><li class="src short"><a href="#v:withNameScope">withNameScope</a> :: <a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> m =&gt; Text -&gt; m a -&gt; m a</li><li class="src short"><a href="#v:withControlDependencies">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</li><li class="src short"><a href="#v:group">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></li><li class="src short"><a href="#v:noOp">noOp</a> :: <a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> m =&gt; m <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a></li></ul></div><div id="interface"><h1 id="g:1">Session</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Session" class="def">Session</a> a</p><div class="subs instances"><p id="control.i:Session" class="caption collapser" onclick="toggleSection('i:Session')">Instances</p><div id="section.i:Session" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> <a href="TensorFlow-Core.html#t:Session">Session</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> <a href="TensorFlow-Core.html#t:Session">Session</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a> <a href="TensorFlow-Core.html#t:Session">Session</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../transformers-0.4.2.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> <a href="TensorFlow-Core.html#t:Session">Session</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">MonadThrow <a href="TensorFlow-Core.html#t:Session">Session</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">MonadMask <a href="TensorFlow-Core.html#t:Session">Session</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">MonadCatch <a href="TensorFlow-Core.html#t:Session">Session</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> <a href="TensorFlow-Core.html#t:Session">Session</a></span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Options" class="def">Options</a></p><div class="doc"><p>Customization for session. Use the lenses to update:
<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">Default <a href="TensorFlow-Core.html#t:Options">Options</a></span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:sessionConfig" class="def">sessionConfig</a> :: Lens' <a href="TensorFlow-Core.html#t:Options">Options</a> <a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Protobuf-Config.html#t:ConfigProto">ConfigProto</a></p><div class="doc"><p>Uses the specified config for the created session.</p></div></div><div class="top"><p class="src"><a name="v:sessionTarget" class="def">sessionTarget</a> :: Lens' <a href="TensorFlow-Core.html#t:Options">Options</a> <a href="../bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</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 name="v:sessionTracer" class="def">sessionTracer</a> :: Lens' <a href="TensorFlow-Core.html#t:Options">Options</a> Tracer</p><div class="doc"><p>Uses the given logger to monitor session progress.</p></div></div><div class="top"><p class="src"><a name="v:runSession" class="def">runSession</a> :: <a href="TensorFlow-Core.html#t:Session">Session</a> a -&gt; <a href="../base-4.8.2.0/System-IO.html#t:IO">IO</a> a</p><div class="doc"><p>Run <code><a href="TensorFlow-Core.html#t:Session">Session</a></code> actions in a new TensorFlow session.</p></div></div><div class="top"><p class="src"><a name="v:runSessionWithOptions" class="def">runSessionWithOptions</a> :: <a href="TensorFlow-Core.html#t:Options">Options</a> -&gt; <a href="TensorFlow-Core.html#t:Session">Session</a> a -&gt; <a href="../base-4.8.2.0/System-IO.html#t:IO">IO</a> a</p><div class="doc"><p>Run <code><a href="TensorFlow-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.8.2.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a name="t:MonadBuild" class="def">MonadBuild</a> m <span class="keyword">where</span></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 methods"><p class="caption">Methods</p><p class="src"><a name="v:build" class="def">build</a> :: <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; m 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"><a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> <a href="TensorFlow-Core.html#t:Session">Session</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.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></td><td class="doc empty">&nbsp;</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 name="t:Fetchable" class="def">Fetchable</a> t 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">(~) * a () =&gt; <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a> a</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> t a =&gt; <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> [t] [a]</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(~) * l (<a href="TensorFlow-Types.html#t:List">List</a> ([] *)) =&gt; <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> (<a href="TensorFlow-Types.html#t:ListOf">ListOf</a> f ([] *)) l</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="TensorFlow-Core.html#t:TensorType">TensorType</a> a, <a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> s a, (~) * a a') =&gt; <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a) (s a')</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="TensorFlow-Core.html#t:TensorType">TensorType</a> a, (~) * a a') =&gt; <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a) (<a href="TensorFlow-Core.html#t:TensorData">TensorData</a> a')</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> t1 a1, <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> t2 a2) =&gt; <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> (t1, t2) (a1, a2)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> (f t) a, <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> (<a href="TensorFlow-Types.html#t:ListOf">ListOf</a> f ts) (<a href="TensorFlow-Types.html#t:List">List</a> as), (~) (* -&gt; *) i <a href="../base-4.8.2.0/Data-Functor-Identity.html#t:Identity">Identity</a>) =&gt; <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> (<a href="TensorFlow-Types.html#t:ListOf">ListOf</a> f ((:) * t ts)) (<a href="TensorFlow-Types.html#t:ListOf">ListOf</a> i ((:) * a as))</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> t1 a1, <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> t2 a2, <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> t3 a3) =&gt; <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> (t1, t2, t3) (a1, a2, a3)</span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:Nodes" class="def">Nodes</a> t</p><div class="doc"><p>Types that contain ops which can be run.</p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="TensorFlow-Nodes.html#v:getNodes">getNodes</a></p></div><div class="subs instances"><p id="control.i:Nodes" class="caption collapser" onclick="toggleSection('i:Nodes')">Instances</p><div id="section.i:Nodes" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:Nodes">Nodes</a> <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t =&gt; <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> [t]</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t1, <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t2) =&gt; <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> (t1, t2)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="TensorFlow-Core.html#t:Nodes">Nodes</a> (f a), <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> (<a href="TensorFlow-Types.html#t:ListOf">ListOf</a> f as)) =&gt; <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> (<a href="TensorFlow-Types.html#t:ListOf">ListOf</a> f ((:) * a as))</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:Nodes">Nodes</a> (<a href="TensorFlow-Types.html#t:ListOf">ListOf</a> f ([] *))</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:Nodes">Nodes</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t1, <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t2, <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t3) =&gt; <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> (t1, t2, t3)</span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:run" class="def">run</a> :: <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> t a =&gt; t -&gt; <a href="TensorFlow-Core.html#t:Session">Session</a> a</p><div class="doc"><p>Run a subgraph <code>t</code>, rendering any dependent nodes that aren't already
rendered, and fetch the corresponding values for <code>a</code>.</p></div></div><div class="top"><p class="src"><a name="v:run_" class="def">run_</a> :: <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t =&gt; t -&gt; <a href="TensorFlow-Core.html#t:Session">Session</a> ()</p><div class="doc"><p>Run a subgraph <code>t</code>, rendering and extending any dependent nodes that aren't
already rendered. This behaves like <code><a href="TensorFlow-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 name="t:Feed" class="def">Feed</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 name="v:feed" class="def">feed</a> :: <a href="TensorFlow-Tensor.html#t:Rendered">Rendered</a> v =&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a -&gt; <a href="TensorFlow-Core.html#t:TensorData">TensorData</a> a -&gt; <a href="TensorFlow-Core.html#t:Feed">Feed</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 name="v:runWithFeeds" class="def">runWithFeeds</a> :: <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-Core.html#t:Session">Session</a> a</p><div class="doc"><p>Run a subgraph <code>t</code>, rendering any dependent nodes that aren't already
rendered, feed the given input values, and fetch the corresponding result
values for <code>a</code>.</p></div></div><div class="top"><p class="src"><a name="v:runWithFeeds_" class="def">runWithFeeds_</a> :: <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-Core.html#t:Session">Session</a> ()</p><div class="doc"><p>Run a subgraph <code>t</code>, rendering any dependent nodes that aren't already
rendered, feed the given input values, and fetch the corresponding result
values for <code>a</code>. This behaves like <code><a href="TensorFlow-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 name="v:asyncProdNodes" class="def">asyncProdNodes</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="TensorFlow-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-Core.html#t:Session">Session</a> ()</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 name="t:Build" class="def">Build</a> = <a href="TensorFlow-Core.html#t:BuildT">BuildT</a> <a href="../base-4.8.2.0/Data-Functor-Identity.html#t:Identity">Identity</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 name="t:BuildT" class="def">BuildT</a> m 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"><a href="../transformers-0.4.2.0/Control-Monad-Trans-Class.html#t:MonadTrans">MonadTrans</a> <a href="TensorFlow-Core.html#t:BuildT">BuildT</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Tensor.html#t:TensorKind">TensorKind</a> <a href="TensorFlow-Core.html#t:Build">Build</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.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></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="../base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> (<a href="TensorFlow-Core.html#t:BuildT">BuildT</a> m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> m =&gt; <a href="../base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> (<a href="TensorFlow-Core.html#t:BuildT">BuildT</a> m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="../base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="TensorFlow-Core.html#t:BuildT">BuildT</a> m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../transformers-0.4.2.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m =&gt; <a href="../transformers-0.4.2.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> (<a href="TensorFlow-Core.html#t:BuildT">BuildT</a> m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">MonadThrow m =&gt; MonadThrow (<a href="TensorFlow-Core.html#t:BuildT">BuildT</a> m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">MonadMask m =&gt; MonadMask (<a href="TensorFlow-Core.html#t:BuildT">BuildT</a> m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">MonadCatch m =&gt; MonadCatch (<a href="TensorFlow-Core.html#t:BuildT">BuildT</a> m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.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></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a> as =&gt; <a href="TensorFlow-BuildOp.html#t:PureResult">PureResult</a> (<a href="TensorFlow-Tensor.html#t:TensorList">TensorList</a> <a href="TensorFlow-Core.html#t:Build">Build</a> as)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-BuildOp.html#t:PureResult">PureResult</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Build">Build</a> a)</span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:render" class="def">render</a> :: <a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> m =&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; m (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Value">Value</a> a)</p><div class="doc"><p>Render a <code><a href="TensorFlow-Core.html#t:Tensor">Tensor</a></code>, fixing its name, scope, device and control inputs from
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 name="v:asGraphDef" class="def">asGraphDef</a> :: <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; <a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef">GraphDef</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 name="v:addGraphDef" class="def">addGraphDef</a> :: <a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> m =&gt; <a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef">GraphDef</a> -&gt; m ()</p></div><div class="top"><p class="src"><a name="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></p></div><div class="top"><p class="src"><a name="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</p></div><h1 id="g:6">Tensor</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ControlNode" class="def">ControlNode</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"><a href="TensorFlow-BuildOp.html#t:BuildResult">BuildResult</a> <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:Nodes">Nodes</a> <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(~) * a () =&gt; <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a> a</span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Tensor" class="def">Tensor</a> v 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"><a href="TensorFlow-BuildOp.html#t:BuildInputs">BuildInputs</a> (<a href="TensorFlow-Types.html#t:ListOf">ListOf</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v) as)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-BuildOp.html#t:BuildInputs">BuildInputs</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a> as =&gt; <a href="TensorFlow-BuildOp.html#t:PureResult">PureResult</a> (<a href="TensorFlow-Tensor.html#t:TensorList">TensorList</a> <a href="TensorFlow-Core.html#t:Build">Build</a> as)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-BuildOp.html#t:PureResult">PureResult</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Build">Build</a> a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="TensorFlow-Tensor.html#t:Rendered">Rendered</a> v, <a href="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a> as) =&gt; <a href="TensorFlow-BuildOp.html#t:BuildResult">BuildResult</a> (<a href="TensorFlow-Tensor.html#t:TensorList">TensorList</a> v as)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Tensor.html#t:Rendered">Rendered</a> v =&gt; <a href="TensorFlow-BuildOp.html#t:BuildResult">BuildResult</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:Nodes">Nodes</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="TensorFlow-Core.html#t:TensorType">TensorType</a> a, <a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> s a, (~) * a a') =&gt; <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a) (s a')</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="TensorFlow-Core.html#t:TensorType">TensorType</a> a, (~) * a a') =&gt; <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a) (<a href="TensorFlow-Core.html#t:TensorData">TensorData</a> a')</span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Value" class="def">Value</a> a</p><div class="subs instances"><p id="control.i:Value" class="caption collapser" onclick="toggleSection('i:Value')">Instances</p><div id="section.i:Value" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> <a href="TensorFlow-Core.html#t:Value">Value</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> <a href="TensorFlow-Core.html#t:Value">Value</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a> <a href="TensorFlow-Core.html#t:Value">Value</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Tensor.html#t:TensorKind">TensorKind</a> <a href="TensorFlow-Core.html#t:Value">Value</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Tensor.html#t:Rendered">Rendered</a> <a href="TensorFlow-Core.html#t:Value">Value</a></span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Ref" class="def">Ref</a> a</p><div class="subs instances"><p id="control.i:Ref" class="caption collapser" onclick="toggleSection('i:Ref')">Instances</p><div id="section.i:Ref" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> <a href="TensorFlow-Core.html#t:Ref">Ref</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> <a href="TensorFlow-Core.html#t:Ref">Ref</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a> <a href="TensorFlow-Core.html#t:Ref">Ref</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Tensor.html#t:TensorKind">TensorKind</a> <a href="TensorFlow-Core.html#t:Ref">Ref</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Tensor.html#t:Rendered">Rendered</a> <a href="TensorFlow-Core.html#t:Ref">Ref</a></span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:value" class="def">value</a> :: <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Ref">Ref</a> a -&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Value">Value</a> a</p><div class="doc"><p>Cast a 'Tensor Ref' into a 'Tensor Value'. This behaves like a no-op.</p></div></div><div class="top"><p class="src"><a name="v:tensorFromName" class="def">tensorFromName</a> :: <a href="TensorFlow-Tensor.html#t:TensorKind">TensorKind</a> v =&gt; Text -&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a</p><div class="doc"><p>Create a <code><a href="TensorFlow-Core.html#t:Tensor">Tensor</a></code> for a given name. This can be used to reference nodes
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 name="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</p></div><h2 id="g:7">Element types</h2><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:TensorType" class="def">TensorType</a> 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"><a href="TensorFlow-Core.html#t:TensorType">TensorType</a> <a href="../base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorType">TensorType</a> <a href="../base-4.8.2.0/Prelude.html#t:Double">Double</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorType">TensorType</a> <a href="../base-4.8.2.0/Prelude.html#t:Float">Float</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorType">TensorType</a> <a href="../base-4.8.2.0/Data-Int.html#t:Int8">Int8</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorType">TensorType</a> <a href="../base-4.8.2.0/Data-Int.html#t:Int16">Int16</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorType">TensorType</a> <a href="../base-4.8.2.0/Data-Int.html#t:Int32">Int32</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorType">TensorType</a> <a href="../base-4.8.2.0/Data-Int.html#t:Int64">Int64</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorType">TensorType</a> <a href="../base-4.8.2.0/Data-Word.html#t:Word8">Word8</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorType">TensorType</a> <a href="../base-4.8.2.0/Data-Word.html#t:Word16">Word16</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorType">TensorType</a> <a href="../bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorType">TensorType</a> (<a href="../base-4.8.2.0/Data-Complex.html#t:Complex">Complex</a> <a href="../base-4.8.2.0/Prelude.html#t:Double">Double</a>)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorType">TensorType</a> (<a href="../base-4.8.2.0/Data-Complex.html#t:Complex">Complex</a> <a href="../base-4.8.2.0/Prelude.html#t:Float">Float</a>)</span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:TensorData" class="def">TensorData</a> a</p><div class="doc"><p>Tensor data with the correct memory layout for tensorflow.</p></div><div class="subs instances"><p id="control.i:TensorData" class="caption collapser" onclick="toggleSection('i:TensorData')">Instances</p><div id="section.i:TensorData" class="show"><table><tr><td class="src clearfix"><span class="inst-left">(<a href="TensorFlow-Core.html#t:TensorType">TensorType</a> a, (~) * a a') =&gt; <a href="TensorFlow-Core.html#t:Fetchable">Fetchable</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a) (<a href="TensorFlow-Core.html#t:TensorData">TensorData</a> a')</span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="TensorFlow-Core.html#t:TensorType">TensorType</a> a =&gt; <a name="t:TensorDataType" class="def">TensorDataType</a> s a <span class="keyword">where</span></p><div class="doc"><p>Types that can be converted to and from <code><a href="TensorFlow-Core.html#t:TensorData">TensorData</a></code>.</p><p><code>Vector</code> is the most efficient to encode/decode for most element types.</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:decodeTensorData" class="def">decodeTensorData</a> :: <a href="TensorFlow-Core.html#t:TensorData">TensorData</a> a -&gt; s a</p><div class="doc"><p>Decode the bytes of a <code><a href="TensorFlow-Core.html#t:TensorData">TensorData</a></code> into an <code><a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-AttrValue.html#v:s">s</a></code>.</p></div><p class="src"><a name="v:encodeTensorData" class="def">encodeTensorData</a> :: <a href="TensorFlow-Core.html#t:Shape">Shape</a> -&gt; s a -&gt; <a href="TensorFlow-Core.html#t:TensorData">TensorData</a> a</p><div class="doc"><p>Encode an <code><a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-AttrValue.html#v:s">s</a></code> into a <code><a href="TensorFlow-Core.html#t:TensorData">TensorData</a></code>.</p><p>The values should be in row major order, e.g.,</p><p>element 0: index (0, ..., 0)
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"><a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.8.2.0/Prelude.html#t:Double">Double</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.8.2.0/Prelude.html#t:Float">Float</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.8.2.0/Data-Int.html#t:Int8">Int8</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.8.2.0/Data-Int.html#t:Int16">Int16</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.8.2.0/Data-Int.html#t:Int32">Int32</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.8.2.0/Data-Int.html#t:Int64">Int64</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.8.2.0/Data-Word.html#t:Word8">Word8</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.8.2.0/Data-Word.html#t:Word16">Word16</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="../base-4.8.2.0/Foreign-Storable.html#t:Storable">Storable</a> a, <a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> Vector a) =&gt; <a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> Vector a</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> Vector <a href="../bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> Vector a =&gt; <a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> <a href="TensorFlow-Core.html#t:Scalar">Scalar</a> a</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> Vector (<a href="../base-4.8.2.0/Data-Complex.html#t:Complex">Complex</a> <a href="../base-4.8.2.0/Prelude.html#t:Double">Double</a>)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> Vector (<a href="../base-4.8.2.0/Data-Complex.html#t:Complex">Complex</a> <a href="../base-4.8.2.0/Prelude.html#t:Float">Float</a>)</span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Scalar" class="def">Scalar</a> a</p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Scalar" class="def">Scalar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:unScalar" class="def">unScalar</a> :: a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Scalar" class="caption collapser" onclick="toggleSection('i:Scalar')">Instances</p><div id="section.i:Scalar" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> Vector a =&gt; <a href="TensorFlow-Core.html#t:TensorDataType">TensorDataType</a> <a href="TensorFlow-Core.html#t:Scalar">Scalar</a> a</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; <a href="../base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> (<a href="TensorFlow-Core.html#t:Scalar">Scalar</a> a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Prelude.html#t:Floating">Floating</a> a =&gt; <a href="../base-4.8.2.0/Prelude.html#t:Floating">Floating</a> (<a href="TensorFlow-Core.html#t:Scalar">Scalar</a> a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Prelude.html#t:Fractional">Fractional</a> a =&gt; <a href="../base-4.8.2.0/Prelude.html#t:Fractional">Fractional</a> (<a href="TensorFlow-Core.html#t:Scalar">Scalar</a> a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="../base-4.8.2.0/Prelude.html#t:Num">Num</a> (<a href="TensorFlow-Core.html#t:Scalar">Scalar</a> a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="../base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> (<a href="TensorFlow-Core.html#t:Scalar">Scalar</a> a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Prelude.html#t:Real">Real</a> a =&gt; <a href="../base-4.8.2.0/Prelude.html#t:Real">Real</a> (<a href="TensorFlow-Core.html#t:Scalar">Scalar</a> a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Prelude.html#t:RealFloat">RealFloat</a> a =&gt; <a href="../base-4.8.2.0/Prelude.html#t:RealFloat">RealFloat</a> (<a href="TensorFlow-Core.html#t:Scalar">Scalar</a> a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Prelude.html#t:RealFrac">RealFrac</a> a =&gt; <a href="../base-4.8.2.0/Prelude.html#t:RealFrac">RealFrac</a> (<a href="TensorFlow-Core.html#t:Scalar">Scalar</a> a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Text-Show.html#t:Show">Show</a> a =&gt; <a href="../base-4.8.2.0/Text-Show.html#t:Show">Show</a> (<a href="TensorFlow-Core.html#t:Scalar">Scalar</a> a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Data-String.html#t:IsString">IsString</a> a =&gt; <a href="../base-4.8.2.0/Data-String.html#t:IsString">IsString</a> (<a href="TensorFlow-Core.html#t:Scalar">Scalar</a> a)</span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Shape" class="def">Shape</a></p><div class="doc"><p>Shape (dimensions) of a tensor.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Shape" class="def">Shape</a> [<a href="../base-4.8.2.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"><a href="../base-4.8.2.0/GHC-Exts.html#t:IsList">IsList</a> <a href="TensorFlow-Core.html#t:Shape">Shape</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="TensorFlow-Core.html#t:Shape">Shape</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:Attribute">Attribute</a> <a href="TensorFlow-Core.html#t:Shape">Shape</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="keyword">type</span> <a href="../base-4.8.2.0/GHC-Exts.html#t:Item">Item</a> <a href="TensorFlow-Core.html#t:Shape">Shape</a> = <a href="../base-4.8.2.0/Data-Int.html#t:Int64">Int64</a></span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:OneOf" class="def">OneOf</a> ts a = (<a href="TensorFlow-Core.html#t:TensorType">TensorType</a> a, <a href="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a> ts, <a href="TensorFlow-Types.html#t:NoneOf">NoneOf</a> (<a href="TensorFlow-Types.html#t:AllTensorTypes">AllTensorTypes</a> <a href="TensorFlow-Types.html#t:-92--92-">\\</a> ts) a)</p><div class="doc"><p>A <code><a href="../base-4.8.2.0/GHC-Exts.html#t:Constraint">Constraint</a></code> specifying the possible choices of a <code><a href="TensorFlow-Core.html#t:TensorType">TensorType</a></code>.</p><p>We implement a <code><a href="../base-4.8.2.0/GHC-Exts.html#t:Constraint">Constraint</a></code> like <code>OneOf '[Double, Float] a</code> by turning the
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 name="t:-47--61-" class="def">/=</a> b :: <a href="../base-4.8.2.0/GHC-Exts.html#t:Constraint">Constraint</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 name="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> v) =&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v b -&gt; m a -&gt; m 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 name="t:Device" class="def">Device</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 name="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><dl><dt class="src"><a name="v:deviceName" class="def">deviceName</a> :: Text</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></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"><a href="../base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> <a href="TensorFlow-Core.html#t:Device">Device</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> <a href="TensorFlow-Core.html#t:Device">Device</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="TensorFlow-Core.html#t:Device">Device</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Data-String.html#t:IsString">IsString</a> <a href="TensorFlow-Core.html#t:Device">Device</a></span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:withDevice" class="def">withDevice</a> :: <a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> m =&gt; <a href="../base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; m a -&gt; m a</p><div class="doc"><p>Set a device for all nodes rendered in the given <code><a href="TensorFlow-Core.html#t:Build">Build</a></code> action
(unless further overridden by another use of withDevice).</p></div></div><div class="top"><p class="src"><a name="v:withNameScope" class="def">withNameScope</a> :: <a href="TensorFlow-Core.html#t:MonadBuild">MonadBuild</a> m =&gt; Text -&gt; m a -&gt; m 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 name="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</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 name="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></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 name="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></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.16.1</p></div></body></html>