1
0
mirror of https://github.com/tensorflow/haskell.git synced 2024-07-03 09:53:30 +02:00
tensorflow-haskell/docs/haddock/tensorflow-0.1.0.0/TensorFlow-Core.html
2016-11-23 10:55:35 -08:00

61 lines
66 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="src/TensorFlow-Core.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">tensorflow-0.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> :: <a href="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a> <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> :: <a href="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a> <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> :: <a href="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a> <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"><a href="#v:build">build</a> :: <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Core.html#t:Session">Session</a> a</li><li class="src short"><a href="#v:buildAnd">buildAnd</a> :: (a -&gt; <a href="TensorFlow-Core.html#t:Session">Session</a> b) -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Core.html#t:Session">Session</a> b</li><li class="src short"><a href="#v:buildWithSummary">buildWithSummary</a> :: <span class="keyword">forall</span> a. <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Core.html#t:Session">Session</a> (a, [<a href="TensorFlow-Build.html#t:SummaryTensor">SummaryTensor</a>])</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">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">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-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:Tensor">Tensor</a> v a -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v 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-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef">GraphDef</a> -&gt; <a href="TensorFlow-Core.html#t:Build">Build</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></li><li class="src short"><span class="keyword">data</span> <a href="#t:Ref">Ref</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:TensorKind">TensorKind</a> v <span class="keyword">where</span><ul class="subs"><li><a href="#v:ValueKind">ValueKind</a> :: <a href="TensorFlow-Core.html#t:TensorKind">TensorKind</a> <a href="TensorFlow-Core.html#t:Value">Value</a></li><li><a href="#v:RefKind">RefKind</a> :: <a href="TensorFlow-Core.html#t:TensorKind">TensorKind</a> <a href="TensorFlow-Core.html#t:Ref">Ref</a></li></ul></li><li class="src short"><a href="#v:tensorAttr">tensorAttr</a> :: <a href="TensorFlow-Types.html#t:Attribute">Attribute</a> attr =&gt; <a href="../text-1.2.2.1/Data-Text.html#t:Text">Text</a> -&gt; <a href="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Traversal-39-">Traversal'</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a) attr</li><li class="src short"><a href="#v:value">value</a> :: <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:Value">Value</a> a</li><li class="src short"><a href="#v:tensorFromName">tensorFromName</a> :: <a href="TensorFlow-Core.html#t:TensorKind">TensorKind</a> v -&gt; <a href="../text-1.2.2.1/Data-Text.html#t:Text">Text</a> -&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v 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="#t:TensorType">TensorType</a> 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; <a href="../vector-0.11.0.0/Data-Vector.html#t:Vector">Vector</a> a</li><li><a href="#v:encodeTensorData">encodeTensorData</a> :: <a href="TensorFlow-Core.html#t:Shape">Shape</a> -&gt; <a href="../vector-0.11.0.0/Data-Vector.html#t:Vector">Vector</a> 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: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> :: <span class="keyword">forall</span> a v b. <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v b -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> 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> :: <a href="../text-1.2.2.1/Data-Text.html#t:Text">Text</a></li></ul>}</li><li class="src short"><a href="#v:withDevice">withDevice</a> :: <a href="../base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> a</li><li class="src short"><a href="#v:withNameScope">withNameScope</a> :: <a href="../text-1.2.2.1/Data-Text.html#t:Text">Text</a> -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> a</li><li class="src short"><a href="#v:named">named</a> :: <a href="TensorFlow-Core.html#t:TensorType">TensorType</a> a =&gt; <a href="../text-1.2.2.1/Data-Text.html#t:Text">Text</a> -&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a -&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a</li><li class="src short"><a href="#v:withControlDependencies">withControlDependencies</a> :: <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t =&gt; t -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> a</li><li class="src short"><a href="#v:group">group</a> :: <a href="TensorFlow-Core.html#t:Nodes">Nodes</a> t =&gt; t -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a></li><li class="src short"><a href="#v:identity">identity</a> :: <a href="TensorFlow-Core.html#t:TensorType">TensorType</a> a =&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a -&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a</li><li class="src short"><a href="#v:noOp">noOp</a> :: <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 <a href="src/TensorFlow-Session.html#Session" class="link">Source</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> <a href="src/TensorFlow-Session.html#line-80" class="link">Source</a></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> <a href="src/TensorFlow-Session.html#line-80" class="link">Source</a></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> <a href="src/TensorFlow-Session.html#line-80" class="link">Source</a></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> <a href="src/TensorFlow-Session.html#line-80" class="link">Source</a></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> <a href="src/TensorFlow-Session.html#Options" class="link">Source</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"><a href="../data-default-0.5.3/Data-Default.html#t:Default">Default</a> <a href="TensorFlow-Core.html#t:Options">Options</a></span> <a href="src/TensorFlow-Session.html#line-94" class="link">Source</a></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> :: <a href="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a> <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> <a href="src/TensorFlow-Session.html#sessionConfig" class="link">Source</a></p><div class="doc"><p>Uses the specified config for the created session.</p></div></div><div class="top"><p class="src"><a name="v:sessionTarget" class="def">sessionTarget</a> :: <a href="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a> <a href="TensorFlow-Core.html#t:Options">Options</a> <a href="../bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/TensorFlow-Session.html#sessionTarget" class="link">Source</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> :: <a href="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a> <a href="TensorFlow-Core.html#t:Options">Options</a> Tracer <a href="src/TensorFlow-Session.html#sessionTracer" class="link">Source</a></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 <a href="src/TensorFlow-Session.html#runSession" class="link">Source</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 <a href="src/TensorFlow-Session.html#runSessionWithOptions" class="link">Source</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"><a name="v:build" class="def">build</a> :: <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Core.html#t:Session">Session</a> a <a href="src/TensorFlow-Session.html#build" class="link">Source</a></p><div class="doc"><p>Lift a <code><a href="TensorFlow-Core.html#t:Build">Build</a></code> action into a <code><a href="TensorFlow-Core.html#t:Session">Session</a></code>, including any explicit op
renderings.</p></div></div><div class="top"><p class="src"><a name="v:buildAnd" class="def">buildAnd</a> :: (a -&gt; <a href="TensorFlow-Core.html#t:Session">Session</a> b) -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Core.html#t:Session">Session</a> b <a href="src/TensorFlow-Session.html#buildAnd" class="link">Source</a></p><div class="doc"><p>Helper combinator for doing something with the result of a <code><a href="TensorFlow-Core.html#t:Build">Build</a></code> action.
Example usage:</p><pre>buildAnd run :: Fetchable t a =&gt; Build t -&gt; Session a</pre></div></div><div class="top"><p class="src"><a name="v:buildWithSummary" class="def">buildWithSummary</a> :: <span class="keyword">forall</span> a. <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Core.html#t:Session">Session</a> (a, [<a href="TensorFlow-Build.html#t:SummaryTensor">SummaryTensor</a>]) <a href="src/TensorFlow-Session.html#buildWithSummary" class="link">Source</a></p><div class="doc"><p>Lift a <code><a href="TensorFlow-Core.html#t:Build">Build</a></code> action into a <code><a href="TensorFlow-Core.html#t:Session">Session</a></code>, including any explicit op
renderings. Returns the merged summary ops which can be used for
logging, see <code><a href="TensorFlow-Logging.html#v:build">build</a></code> for a convenient wrapper.</p></div></div><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 <a href="src/TensorFlow-Nodes.html#Fetchable" class="link">Source</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> <a href="src/TensorFlow-Nodes.html#line-98" class="link">Source</a></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> <a href="src/TensorFlow-Nodes.html#line-88" class="link">Source</a></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:Scalar">Scalar</a> a')</span> <a href="src/TensorFlow-Nodes.html#line-135" class="link">Source</a></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="../vector-0.11.0.0/Data-Vector.html#t:Vector">Vector</a> a')</span> <a href="src/TensorFlow-Nodes.html#line-128" class="link">Source</a></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> <a href="src/TensorFlow-Nodes.html#line-77" class="link">Source</a></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> <a href="src/TensorFlow-Nodes.html#line-80" class="link">Source</a></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 <a href="src/TensorFlow-Nodes.html#Scalar" class="link">Source</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="../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> <a href="src/TensorFlow-Nodes.html#line-132" class="link">Source</a></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> <a href="src/TensorFlow-Nodes.html#line-132" class="link">Source</a></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> <a href="src/TensorFlow-Nodes.html#line-132" class="link">Source</a></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> <a href="src/TensorFlow-Nodes.html#line-132" class="link">Source</a></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> <a href="src/TensorFlow-Nodes.html#line-132" class="link">Source</a></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> <a href="src/TensorFlow-Nodes.html#line-132" class="link">Source</a></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> <a href="src/TensorFlow-Nodes.html#line-132" class="link">Source</a></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> <a href="src/TensorFlow-Nodes.html#line-133" class="link">Source</a></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> <a href="src/TensorFlow-Nodes.html#line-132" class="link">Source</a></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> <a href="src/TensorFlow-Nodes.html#line-133" class="link">Source</a></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:Scalar">Scalar</a> a')</span> <a href="src/TensorFlow-Nodes.html#line-135" class="link">Source</a></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 <a href="src/TensorFlow-Nodes.html#Nodes" class="link">Source</a></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> <a href="src/TensorFlow-Nodes.html#line-91" class="link">Source</a></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> <a href="src/TensorFlow-Nodes.html#line-85" class="link">Source</a></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> <a href="src/TensorFlow-Nodes.html#line-71" class="link">Source</a></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> <a href="src/TensorFlow-Nodes.html#line-101" class="link">Source</a></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> <a href="src/TensorFlow-Nodes.html#line-74" class="link">Source</a></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 <a href="src/TensorFlow-Session.html#run" class="link">Source</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> () <a href="src/TensorFlow-Session.html#run_" class="link">Source</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> <a href="src/TensorFlow-Tensor.html#Feed" class="link">Source</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-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> <a href="src/TensorFlow-Tensor.html#feed" class="link">Source</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 <a href="src/TensorFlow-Session.html#runWithFeeds" class="link">Source</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> () <a href="src/TensorFlow-Session.html#runWithFeeds_" class="link">Source</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> <a href="src/TensorFlow-Session.html#asyncProdNodes" class="link">Source</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> <a href="src/TensorFlow-Build.html#Build" class="link">Source</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 <a href="src/TensorFlow-Build.html#BuildT" class="link">Source</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> <a href="src/TensorFlow-Build.html#line-198" class="link">Source</a></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="../lens-family-1.2.0/Lens-Family2-State-Lazy.html#t:MonadState">MonadState</a> <a href="TensorFlow-Build.html#t:GraphState">GraphState</a> (<a href="TensorFlow-Core.html#t:BuildT">BuildT</a> m)</span> <a href="src/TensorFlow-Build.html#line-199" class="link">Source</a></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> <a href="src/TensorFlow-Build.html#line-198" class="link">Source</a></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> <a href="src/TensorFlow-Build.html#line-198" class="link">Source</a></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> <a href="src/TensorFlow-Build.html#line-198" class="link">Source</a></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> <a href="src/TensorFlow-Build.html#line-198" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-BuildOp.html#t:OpResult">OpResult</a> a =&gt; <a href="TensorFlow-BuildOp.html#t:BuildOp">BuildOp</a> (<a href="TensorFlow-Core.html#t:Build">Build</a> a)</span> <a href="src/TensorFlow-BuildOp.html#line-189" class="link">Source</a></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:Tensor">Tensor</a> v a -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a) <a href="src/TensorFlow-Build.html#render" class="link">Source</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:Build">Build</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; <code>render &gt;=&gt; render === render</code>. However,
rendering a (previously un-rendered) <code><a href="TensorFlow-Core.html#t:Tensor">Tensor</a></code> in two different contexts
may result in two different <code><a href="TensorFlow-Core.html#t:Tensor">Tensor</a></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> <a href="src/TensorFlow-Build.html#asGraphDef" class="link">Source</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-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef">GraphDef</a> -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> () <a href="src/TensorFlow-Build.html#addGraphDef" class="link">Source</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> <a href="src/TensorFlow-Output.html#ControlNode" class="link">Source</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:BuildOp">BuildOp</a> <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a></span> <a href="src/TensorFlow-BuildOp.html#line-150" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-BuildOp.html#t:OpResult">OpResult</a> <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a></span> <a href="src/TensorFlow-BuildOp.html#line-98" class="link">Source</a></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> <a href="src/TensorFlow-Nodes.html#line-91" class="link">Source</a></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> <a href="src/TensorFlow-Nodes.html#line-98" class="link">Source</a></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 <a href="src/TensorFlow-Tensor.html#Tensor" class="link">Source</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 <code><a href="TensorFlow-Core.html#t:Value">Value</a></code> or <code><a href="TensorFlow-Core.html#t:Ref">Ref</a></code>, depending on whether the graph is
treating this op output as an immutable <code><a href="TensorFlow-Core.html#t:Value">Value</a></code> or a stateful <code><a href="TensorFlow-Core.html#t:Ref">Ref</a></code> (e.g., a
variable). Note that a <code>Tensor Ref</code> can be casted into a <code>Tensor Value</code> via
<code><a href="TensorFlow-Core.html#v:value">value</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:BuildOp">BuildOp</a> [<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Value">Value</a> a]</span> <a href="src/TensorFlow-BuildOp.html#line-162" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-BuildOp.html#t:BuildOp">BuildOp</a> f =&gt; <a href="TensorFlow-BuildOp.html#t:BuildOp">BuildOp</a> ([<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a] -&gt; f)</span> <a href="src/TensorFlow-BuildOp.html#line-198" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-BuildOp.html#t:BuildOp">BuildOp</a> f =&gt; <a href="TensorFlow-BuildOp.html#t:BuildOp">BuildOp</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a -&gt; f)</span> <a href="src/TensorFlow-BuildOp.html#line-195" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-BuildOp.html#t:BuildOp">BuildOp</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Ref">Ref</a> a)</span> <a href="src/TensorFlow-BuildOp.html#line-159" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-BuildOp.html#t:BuildOp">BuildOp</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Value">Value</a> a)</span> <a href="src/TensorFlow-BuildOp.html#line-156" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-BuildOp.html#t:OpResult">OpResult</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Ref">Ref</a> a)</span> <a href="src/TensorFlow-BuildOp.html#line-95" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-BuildOp.html#t:OpResult">OpResult</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Value">Value</a> a)</span> <a href="src/TensorFlow-BuildOp.html#line-92" class="link">Source</a></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> <a href="src/TensorFlow-Nodes.html#line-101" class="link">Source</a></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:Scalar">Scalar</a> a')</span> <a href="src/TensorFlow-Nodes.html#line-135" class="link">Source</a></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="../vector-0.11.0.0/Data-Vector.html#t:Vector">Vector</a> a')</span> <a href="src/TensorFlow-Nodes.html#line-128" class="link">Source</a></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 href="src/TensorFlow-Tensor.html#Value" class="link">Source</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="TensorFlow-BuildOp.html#t:BuildOp">BuildOp</a> [<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Value">Value</a> a]</span> <a href="src/TensorFlow-BuildOp.html#line-162" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-BuildOp.html#t:BuildOp">BuildOp</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Value">Value</a> a)</span> <a href="src/TensorFlow-BuildOp.html#line-156" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-BuildOp.html#t:OpResult">OpResult</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Value">Value</a> a)</span> <a href="src/TensorFlow-BuildOp.html#line-92" class="link">Source</a></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 href="src/TensorFlow-Tensor.html#Ref" class="link">Source</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="TensorFlow-BuildOp.html#t:BuildOp">BuildOp</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Ref">Ref</a> a)</span> <a href="src/TensorFlow-BuildOp.html#line-159" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-BuildOp.html#t:OpResult">OpResult</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Ref">Ref</a> a)</span> <a href="src/TensorFlow-BuildOp.html#line-95" class="link">Source</a></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:TensorKind" class="def">TensorKind</a> v <span class="keyword">where</span> <a href="src/TensorFlow-Tensor.html#TensorKind" class="link">Source</a></p><div class="doc"><p>This class provides a runtime switch on whether a <code><a href="TensorFlow-Core.html#t:Tensor">Tensor</a></code> should be
treated as a <code><a href="TensorFlow-Core.html#t:Value">Value</a></code> or as a <code><a href="TensorFlow-Core.html#t:Ref">Ref</a></code>.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ValueKind" class="def">ValueKind</a> :: <a href="TensorFlow-Core.html#t:TensorKind">TensorKind</a> <a href="TensorFlow-Core.html#t:Value">Value</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:RefKind" class="def">RefKind</a> :: <a href="TensorFlow-Core.html#t:TensorKind">TensorKind</a> <a href="TensorFlow-Core.html#t:Ref">Ref</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><a name="v:tensorAttr" class="def">tensorAttr</a> :: <a href="TensorFlow-Types.html#t:Attribute">Attribute</a> attr =&gt; <a href="../text-1.2.2.1/Data-Text.html#t:Text">Text</a> -&gt; <a href="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Traversal-39-">Traversal'</a> (<a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a) attr <a href="src/TensorFlow-Tensor.html#tensorAttr" class="link">Source</a></p><div class="doc"><p>Lens for the attributes of a tensor.</p><p>Only valid if the tensor has not yet been rendered. If the tensor has been
rendered, the traversal will be over nothing (nothing can be read or
written).</p></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> v a -&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> <a href="TensorFlow-Core.html#t:Value">Value</a> a <a href="src/TensorFlow-Tensor.html#value" class="link">Source</a></p><div class="doc"><p>Cast a 'Tensor *' into a 'Tensor Value'. Common usage is to cast a
Ref into 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-Core.html#t:TensorKind">TensorKind</a> v -&gt; <a href="../text-1.2.2.1/Data-Text.html#t:Text">Text</a> -&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a <a href="src/TensorFlow-Tensor.html#tensorFromName" class="link">Source</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>addGraphDef</code>.
TODO(judahjacobson): add more safety checks here.</p></div></div><h2 id="g:7">Element types</h2><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:TensorData" class="def">TensorData</a> a <a href="src/TensorFlow-Types.html#TensorData" class="link">Source</a></p><div class="doc"><p>Data about a tensor that is encoded for the TensorFlow APIs.</p></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:TensorType" class="def">TensorType</a> a <span class="keyword">where</span> <a href="src/TensorFlow-Types.html#TensorType" class="link">Source</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>, <a href="TensorFlow-Core.html#v:decodeTensorData">decodeTensorData</a>, <a href="TensorFlow-Core.html#v:encodeTensorData">encodeTensorData</a></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; <a href="../vector-0.11.0.0/Data-Vector.html#t:Vector">Vector</a> a <a href="src/TensorFlow-Types.html#decodeTensorData" class="link">Source</a></p><div class="doc"><p>Decode the bytes of a TensorData into a Vector.</p></div><p class="src"><a name="v:encodeTensorData" class="def">encodeTensorData</a> :: <a href="TensorFlow-Core.html#t:Shape">Shape</a> -&gt; <a href="../vector-0.11.0.0/Data-Vector.html#t:Vector">Vector</a> a -&gt; <a href="TensorFlow-Core.html#t:TensorData">TensorData</a> a <a href="src/TensorFlow-Types.html#encodeTensorData" class="link">Source</a></p><div class="doc"><p>Encode a Vector into a TensorData.</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: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> <a href="src/TensorFlow-Types.html#line-244" class="link">Source</a></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> <a href="src/TensorFlow-Types.html#line-137" class="link">Source</a></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> <a href="src/TensorFlow-Types.html#line-130" class="link">Source</a></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> <a href="src/TensorFlow-Types.html#line-182" class="link">Source</a></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> <a href="src/TensorFlow-Types.html#line-175" class="link">Source</a></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> <a href="src/TensorFlow-Types.html#line-144" class="link">Source</a></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> <a href="src/TensorFlow-Types.html#line-151" class="link">Source</a></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> <a href="src/TensorFlow-Types.html#line-161" class="link">Source</a></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> <a href="src/TensorFlow-Types.html#line-168" class="link">Source</a></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> <a href="src/TensorFlow-Types.html#line-189" class="link">Source</a></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> <a href="src/TensorFlow-Types.html#line-258" class="link">Source</a></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> <a href="src/TensorFlow-Types.html#line-251" class="link">Source</a></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> <a href="src/TensorFlow-Types.html#Shape" class="link">Source</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> <a href="src/TensorFlow-Types.html#line-268" class="link">Source</a></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> <a href="src/TensorFlow-Types.html#line-266" class="link">Source</a></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> <a href="src/TensorFlow-Types.html#line-301" class="link">Source</a></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> <a href="src/TensorFlow-Types.html#line-269" class="link">Source</a></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) <a href="src/TensorFlow-Types.html#OneOf" class="link">Source</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> <a href="src/TensorFlow-Types.html#%2F%3D" class="link">Source</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> :: <span class="keyword">forall</span> a v b. <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v b -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> a <a href="src/TensorFlow-Build.html#colocateWith" class="link">Source</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> <a href="src/TensorFlow-Output.html#Device" class="link">Source</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> :: <a href="../text-1.2.2.1/Data-Text.html#t:Text">Text</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: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> <a href="src/TensorFlow-Output.html#line-88" class="link">Source</a></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> <a href="src/TensorFlow-Output.html#line-88" class="link">Source</a></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> <a href="src/TensorFlow-Output.html#line-90" class="link">Source</a></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> <a href="src/TensorFlow-Output.html#line-88" class="link">Source</a></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="../base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="TensorFlow-Core.html#t:Device">Device</a> -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> a <a href="src/TensorFlow-Build.html#withDevice" class="link">Source</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="../text-1.2.2.1/Data-Text.html#t:Text">Text</a> -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> a <a href="src/TensorFlow-Build.html#withNameScope" class="link">Source</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><div class="top"><p class="src"><a name="v:named" class="def">named</a> :: <a href="TensorFlow-Core.html#t:TensorType">TensorType</a> a =&gt; <a href="../text-1.2.2.1/Data-Text.html#t:Text">Text</a> -&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a -&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a <a href="src/TensorFlow-ControlFlow.html#named" class="link">Source</a></p><div class="doc"><p>Returns a <code><a href="TensorFlow-Core.html#t:Tensor">Tensor</a></code> with a given name and the same shape and contents as
the input.</p><p>TODO(judahjacobson): This breaks when used with uninitialize <code>Tensor Ref</code>s,
since <code>RefIdentity</code> doesn't have SetAllowsUninitializedInput(). Look into
whether we can change that op.</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:Nodes">Nodes</a> t =&gt; t -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> a <a href="src/TensorFlow-ControlFlow.html#withControlDependencies" class="link">Source</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:Nodes">Nodes</a> t =&gt; t -&gt; <a href="TensorFlow-Core.html#t:Build">Build</a> <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a> <a href="src/TensorFlow-ControlFlow.html#group" class="link">Source</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:identity" class="def">identity</a> :: <a href="TensorFlow-Core.html#t:TensorType">TensorType</a> a =&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a -&gt; <a href="TensorFlow-Core.html#t:Tensor">Tensor</a> v a <a href="src/TensorFlow-ControlFlow.html#identity" class="link">Source</a></p><div class="doc"><p>Returns a <code><a href="TensorFlow-Core.html#t:Tensor">Tensor</a></code> with the same shape and contents as the input.</p></div></div><div class="top"><p class="src"><a name="v:noOp" class="def">noOp</a> :: <a href="TensorFlow-Core.html#t:ControlNode">ControlNode</a> <a href="src/TensorFlow-ControlFlow.html#noOp" class="link">Source</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>