1
0
Fork 0
mirror of https://github.com/tensorflow/haskell.git synced 2024-11-27 05:19:45 +01:00
tensorflow-haskell/docs/haddock/tensorflow-0.2.0.0/TensorFlow-Build.html
2018-08-13 21:05:49 -07:00

14 lines
No EOL
52 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.Build</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/TensorFlow.Build.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">tensorflow-0.2.0.0: TensorFlow bindings.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">TensorFlow.Build</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Graph node types</a></li><li><a href="#g:2">Ops</a></li><li><a href="#g:3">The Build monad</a></li><li><a href="#g:4">Creating and looking up Ops</a></li><li><a href="#g:5">Modifying all nodes in a Build action</a></li></ul></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">newtype</span> <a href="#t:ControlNode">ControlNode</a> = <a href="#v:ControlNode">ControlNode</a> {<ul class="subs"><li><a href="#v:unControlNode">unControlNode</a> :: <a href="TensorFlow-Output.html#t:NodeName">NodeName</a></li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:Unique">Unique</a></li><li class="src short"><a href="#v:explicitName">explicitName</a> :: Text -&gt; <a href="TensorFlow-Output.html#t:PendingNodeName">PendingNodeName</a></li><li class="src short"><a href="#v:implicitName">implicitName</a> :: <a href="TensorFlow-Output.html#t:PendingNodeName">PendingNodeName</a></li><li class="src short"><a href="#v:opDef">opDef</a> :: <a href="TensorFlow-Output.html#t:OpType">OpType</a> -&gt; <a href="TensorFlow-Output.html#t:OpDef">OpDef</a></li><li class="src short"><a href="#v:opDefWithName">opDefWithName</a> :: <a href="TensorFlow-Output.html#t:PendingNodeName">PendingNodeName</a> -&gt; <a href="TensorFlow-Output.html#t:OpType">OpType</a> -&gt; <a href="TensorFlow-Output.html#t:OpDef">OpDef</a></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:opType">opType</a> :: Lens' <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> <a href="TensorFlow-Output.html#t:OpType">OpType</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"><a href="#v:opInputs">opInputs</a> :: Lens' <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> [<a href="TensorFlow-Output.html#t:Output">Output</a>]</li><li class="src short"><a href="#v:opControlInputs">opControlInputs</a> :: Lens' <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> [<a href="TensorFlow-Output.html#t:NodeName">NodeName</a>]</li><li class="src short"><span class="keyword">data</span> <a href="#t:GraphState">GraphState</a></li><li class="src short"><a href="#v:renderedNodeDefs">renderedNodeDefs</a> :: Lens' <a href="TensorFlow-Build.html#t:GraphState">GraphState</a> (<a href="../containers-0.5.10.2/Data-Map-Internal.html#t:Map">Map</a> <a href="TensorFlow-Output.html#t:NodeName">NodeName</a> <a href="../tensorflow-proto-0.2.0.0/Proto-Tensorflow-Core-Framework-NodeDef.html#t:NodeDef">NodeDef</a>)</li><li class="src short"><span class="keyword">data</span> <a href="#t:BuildT">BuildT</a> m a</li><li class="src short"><span class="keyword">type</span> <a href="#t:Build">Build</a> = <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> <a href="../base-4.10.1.0/Data-Functor-Identity.html#t:Identity">Identity</a></li><li class="src short"><span class="keyword">class</span> <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="#t:MonadBuild">MonadBuild</a> m <span class="keyword">where</span><ul class="subs"></ul></li><li class="src short"><a href="#v:addInitializer">addInitializer</a> :: <a href="TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m =&gt; <a href="TensorFlow-Build.html#t:ControlNode">ControlNode</a> -&gt; m ()</li><li class="src short"><a href="#v:hoistBuildT">hoistBuildT</a> :: (<span class="keyword">forall</span> a. m a -&gt; n a) -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m b -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> n b</li><li class="src short"><a href="#v:evalBuildT">evalBuildT</a> :: <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a -&gt; m a</li><li class="src short"><a href="#v:runBuildT">runBuildT</a> :: <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a -&gt; m (a, <a href="TensorFlow-Build.html#t:GraphState">GraphState</a>)</li><li class="src short"><a href="#v:asGraphDef">asGraphDef</a> :: <a href="TensorFlow-Build.html#t:Build">Build</a> a -&gt; <a href="../tensorflow-proto-0.2.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef">GraphDef</a></li><li class="src short"><a href="#v:addGraphDef">addGraphDef</a> :: <a href="TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m =&gt; <a href="../tensorflow-proto-0.2.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef">GraphDef</a> -&gt; m ()</li><li class="src short"><a href="#v:flushInitializers">flushInitializers</a> :: <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m [<a href="TensorFlow-Output.html#t:NodeName">NodeName</a>]</li><li class="src short"><a href="#v:flushNodeBuffer">flushNodeBuffer</a> :: <a href="TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m =&gt; m [<a href="../tensorflow-proto-0.2.0.0/Proto-Tensorflow-Core-Framework-NodeDef.html#t:NodeDef">NodeDef</a>]</li><li class="src short"><a href="#v:summaries">summaries</a> :: Lens' <a href="TensorFlow-Build.html#t:GraphState">GraphState</a> [<a href="TensorFlow-Output.html#t:Output">Output</a>]</li><li class="src short"><a href="#v:getOrAddOp">getOrAddOp</a> :: <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> <a href="TensorFlow-Output.html#t:NodeName">NodeName</a></li><li class="src short"><a href="#v:addNewOp">addNewOp</a> :: <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> <a href="TensorFlow-Output.html#t:NodeName">NodeName</a></li><li class="src short"><a href="#v:encodeOutput">encodeOutput</a> :: <a href="TensorFlow-Output.html#t:Output">Output</a> -&gt; Text</li><li class="src short"><a href="#v:lookupNode">lookupNode</a> :: <a href="TensorFlow-Output.html#t:NodeName">NodeName</a> -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> <a href="../tensorflow-proto-0.2.0.0/Proto-Tensorflow-Core-Framework-NodeDef.html#t:NodeDef">NodeDef</a></li><li class="src short"><a href="#v:withStateLens">withStateLens</a> :: <a href="TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m =&gt; Lens' <a href="TensorFlow-Build.html#t:GraphState">GraphState</a> a -&gt; (a -&gt; a) -&gt; m b -&gt; m b</li><li class="src short"><a href="#v:withDevice">withDevice</a> :: <a href="TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m =&gt; <a href="../base-4.10.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="TensorFlow-Output.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-Build.html#t:MonadBuild">MonadBuild</a> m =&gt; Text -&gt; m a -&gt; m a</li><li class="src short"><a href="#v:withNodeDependencies">withNodeDependencies</a> :: <a href="TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m =&gt; <a href="../containers-0.5.10.2/Data-Set-Internal.html#t:Set">Set</a> <a href="TensorFlow-Output.html#t:NodeName">NodeName</a> -&gt; m a -&gt; m a</li></ul></div><div id="interface"><h1 id="g:1">Graph node types</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a id="t:ControlNode" class="def">ControlNode</a> <a href="src/TensorFlow.Output.html#ControlNode" class="link">Source</a> <a href="#t:ControlNode" class="selflink">#</a></p><div class="doc"><p>A type of graph node which has no outputs. These nodes are
valuable for causing side effects when they are run.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:ControlNode" class="def">ControlNode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:unControlNode" class="def">unControlNode</a> :: <a href="TensorFlow-Output.html#t:NodeName">NodeName</a></dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr></table></div><div class="subs instances"><p id="control.i:ControlNode" class="caption collapser" onclick="toggleSection('i:ControlNode')">Instances</p><div id="section.i:ControlNode" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ControlNode:Nodes:1" class="instance expander" onclick="toggleSection('i:id:ControlNode:Nodes:1')"></span> <a href="TensorFlow-Nodes.html#t:Nodes">Nodes</a> <a href="TensorFlow-Build.html#t:ControlNode">ControlNode</a></span> <a href="src/TensorFlow.Nodes.html#line-98" class="link">Source</a> <a href="#t:Nodes" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ControlNode:Nodes:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:getNodes">getNodes</a> :: <a href="TensorFlow-Build.html#t:ControlNode">ControlNode</a> -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> (<a href="../containers-0.5.10.2/Data-Set-Internal.html#t:Set">Set</a> <a href="TensorFlow-Output.html#t:NodeName">NodeName</a>) <a href="src/TensorFlow.Nodes.html#getNodes" class="link">Source</a> <a href="#v:getNodes" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ControlNode:BuildResult:2" class="instance expander" onclick="toggleSection('i:id:ControlNode:BuildResult:2')"></span> <a href="TensorFlow-BuildOp.html#t:BuildResult">BuildResult</a> <a href="TensorFlow-Build.html#t:ControlNode">ControlNode</a></span> <a href="src/TensorFlow.BuildOp.html#line-132" class="link">Source</a> <a href="#t:BuildResult" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ControlNode:BuildResult:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:buildResult">buildResult</a> :: Result <a href="TensorFlow-Build.html#t:ControlNode">ControlNode</a> <a href="src/TensorFlow.BuildOp.html#buildResult" class="link">Source</a> <a href="#v:buildResult" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ControlNode:Fetchable:3" class="instance expander" onclick="toggleSection('i:id:ControlNode:Fetchable:3')"></span> (~) <a href="../base-4.10.1.0/Data-Kind.html#t:-42-">*</a> a () =&gt; <a href="TensorFlow-Nodes.html#t:Fetchable">Fetchable</a> <a href="TensorFlow-Build.html#t:ControlNode">ControlNode</a> a</span> <a href="src/TensorFlow.Nodes.html#line-105" class="link">Source</a> <a href="#t:Fetchable" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ControlNode:Fetchable:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:getFetch">getFetch</a> :: <a href="TensorFlow-Build.html#t:ControlNode">ControlNode</a> -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> (<a href="TensorFlow-Nodes.html#t:Fetch">Fetch</a> a) <a href="src/TensorFlow.Nodes.html#getFetch" class="link">Source</a> <a href="#v:getFetch" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Unique" class="def">Unique</a> <a href="src/TensorFlow.Build.html#Unique" class="link">Source</a> <a href="#t:Unique" class="selflink">#</a></p><div class="subs instances"><p id="control.i:Unique" class="caption collapser" onclick="toggleSection('i:Unique')">Instances</p><div id="section.i:Unique" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Unique:Enum:1" class="instance expander" onclick="toggleSection('i:id:Unique:Enum:1')"></span> <a href="../base-4.10.1.0/Prelude.html#t:Enum">Enum</a> <a href="TensorFlow-Build.html#t:Unique">Unique</a></span> <a href="src/TensorFlow.Build.html#line-97" class="link">Source</a> <a href="#t:Unique" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Unique:Enum:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:succ">succ</a> :: <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="TensorFlow-Build.html#t:Unique">Unique</a> <a href="#v:succ" class="selflink">#</a></p><p class="src"><a href="#v:pred">pred</a> :: <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="TensorFlow-Build.html#t:Unique">Unique</a> <a href="#v:pred" class="selflink">#</a></p><p class="src"><a href="#v:toEnum">toEnum</a> :: <a href="../base-4.10.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="TensorFlow-Build.html#t:Unique">Unique</a> <a href="#v:toEnum" class="selflink">#</a></p><p class="src"><a href="#v:fromEnum">fromEnum</a> :: <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="../base-4.10.1.0/Data-Int.html#t:Int">Int</a> <a href="#v:fromEnum" class="selflink">#</a></p><p class="src"><a href="#v:enumFrom">enumFrom</a> :: <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; [<a href="TensorFlow-Build.html#t:Unique">Unique</a>] <a href="#v:enumFrom" class="selflink">#</a></p><p class="src"><a href="#v:enumFromThen">enumFromThen</a> :: <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; [<a href="TensorFlow-Build.html#t:Unique">Unique</a>] <a href="#v:enumFromThen" class="selflink">#</a></p><p class="src"><a href="#v:enumFromTo">enumFromTo</a> :: <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; [<a href="TensorFlow-Build.html#t:Unique">Unique</a>] <a href="#v:enumFromTo" class="selflink">#</a></p><p class="src"><a href="#v:enumFromThenTo">enumFromThenTo</a> :: <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; [<a href="TensorFlow-Build.html#t:Unique">Unique</a>] <a href="#v:enumFromThenTo" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Unique:Eq:2" class="instance expander" onclick="toggleSection('i:id:Unique:Eq:2')"></span> <a href="../base-4.10.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="TensorFlow-Build.html#t:Unique">Unique</a></span> <a href="src/TensorFlow.Build.html#line-97" class="link">Source</a> <a href="#t:Unique" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Unique:Eq:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Unique:Ord:3" class="instance expander" onclick="toggleSection('i:id:Unique:Ord:3')"></span> <a href="../base-4.10.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="TensorFlow-Build.html#t:Unique">Unique</a></span> <a href="src/TensorFlow.Build.html#line-97" class="link">Source</a> <a href="#t:Unique" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Unique:Ord:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="../base-4.10.1.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(&lt;)</a> :: <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(&lt;=)</a> :: <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(&gt;)</a> :: <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(&gt;=)</a> :: <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="TensorFlow-Build.html#t:Unique">Unique</a> <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="TensorFlow-Build.html#t:Unique">Unique</a> -&gt; <a href="TensorFlow-Build.html#t:Unique">Unique</a> <a href="#v:min" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><h1 id="g:2">Ops</h1><div class="top"><p class="src"><a id="v:explicitName" class="def">explicitName</a> :: Text -&gt; <a href="TensorFlow-Output.html#t:PendingNodeName">PendingNodeName</a> <a href="src/TensorFlow.Build.html#explicitName" class="link">Source</a> <a href="#v:explicitName" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:implicitName" class="def">implicitName</a> :: <a href="TensorFlow-Output.html#t:PendingNodeName">PendingNodeName</a> <a href="src/TensorFlow.Build.html#implicitName" class="link">Source</a> <a href="#v:implicitName" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:opDef" class="def">opDef</a> :: <a href="TensorFlow-Output.html#t:OpType">OpType</a> -&gt; <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> <a href="src/TensorFlow.Build.html#opDef" class="link">Source</a> <a href="#v:opDef" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:opDefWithName" class="def">opDefWithName</a> :: <a href="TensorFlow-Output.html#t:PendingNodeName">PendingNodeName</a> -&gt; <a href="TensorFlow-Output.html#t:OpType">OpType</a> -&gt; <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> <a href="src/TensorFlow.Build.html#opDefWithName" class="link">Source</a> <a href="#v:opDefWithName" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:opName" class="def">opName</a> :: Lens' <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> <a href="TensorFlow-Output.html#t:PendingNodeName">PendingNodeName</a> <a href="src/TensorFlow.Output.html#opName" class="link">Source</a> <a href="#v:opName" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:opType" class="def">opType</a> :: Lens' <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> <a href="TensorFlow-Output.html#t:OpType">OpType</a> <a href="src/TensorFlow.Output.html#opType" class="link">Source</a> <a href="#v:opType" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:opAttr" class="def">opAttr</a> :: <a href="TensorFlow-Types.html#t:Attribute">Attribute</a> a =&gt; Text -&gt; Lens' <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> a <a href="src/TensorFlow.Output.html#opAttr" class="link">Source</a> <a href="#v:opAttr" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:opInputs" class="def">opInputs</a> :: Lens' <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> [<a href="TensorFlow-Output.html#t:Output">Output</a>] <a href="src/TensorFlow.Output.html#opInputs" class="link">Source</a> <a href="#v:opInputs" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:opControlInputs" class="def">opControlInputs</a> :: Lens' <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> [<a href="TensorFlow-Output.html#t:NodeName">NodeName</a>] <a href="src/TensorFlow.Output.html#opControlInputs" class="link">Source</a> <a href="#v:opControlInputs" class="selflink">#</a></p></div><h1 id="g:3">The Build monad</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:GraphState" class="def">GraphState</a> <a href="src/TensorFlow.Build.html#GraphState" class="link">Source</a> <a href="#t:GraphState" class="selflink">#</a></p><div class="subs instances"><p id="control.i:GraphState" class="caption collapser" onclick="toggleSection('i:GraphState')">Instances</p><div id="section.i:GraphState" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:GraphState:MonadState:1" class="instance expander" onclick="toggleSection('i:id:GraphState:MonadState:1')"></span> <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; MonadState <a href="TensorFlow-Build.html#t:GraphState">GraphState</a> (<a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m)</span> <a href="src/TensorFlow.Build.html#line-195" class="link">Source</a> <a href="#t:GraphState" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:GraphState:MonadState:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:get">get</a> :: <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m <a href="TensorFlow-Build.html#t:GraphState">GraphState</a></p><p class="src"><a href="#v:put">put</a> :: <a href="TensorFlow-Build.html#t:GraphState">GraphState</a> -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m ()</p><p class="src"><a href="#v:state">state</a> :: (<a href="TensorFlow-Build.html#t:GraphState">GraphState</a> -&gt; (a, <a href="TensorFlow-Build.html#t:GraphState">GraphState</a>)) -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a</p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:renderedNodeDefs" class="def">renderedNodeDefs</a> :: Lens' <a href="TensorFlow-Build.html#t:GraphState">GraphState</a> (<a href="../containers-0.5.10.2/Data-Map-Internal.html#t:Map">Map</a> <a href="TensorFlow-Output.html#t:NodeName">NodeName</a> <a href="../tensorflow-proto-0.2.0.0/Proto-Tensorflow-Core-Framework-NodeDef.html#t:NodeDef">NodeDef</a>) <a href="src/TensorFlow.Build.html#renderedNodeDefs" class="link">Source</a> <a href="#v:renderedNodeDefs" class="selflink">#</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:BuildT" class="def">BuildT</a> m a <a href="src/TensorFlow.Build.html#BuildT" class="link">Source</a> <a href="#t:BuildT" class="selflink">#</a></p><div class="doc"><p>An action for building nodes in a TensorFlow graph.
Used to manage build state internally as part of the <code>Session</code> monad.</p></div><div class="subs instances"><p id="control.i:BuildT" class="caption collapser" onclick="toggleSection('i:BuildT')">Instances</p><div id="section.i:BuildT" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:BuildT:MonadTrans:1" class="instance expander" onclick="toggleSection('i:id:BuildT:MonadTrans:1')"></span> <a href="../transformers-0.5.2.0/Control-Monad-Trans-Class.html#t:MonadTrans">MonadTrans</a> <a href="TensorFlow-Build.html#t:BuildT">BuildT</a></span> <a href="src/TensorFlow.Build.html#line-194" class="link">Source</a> <a href="#t:BuildT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:BuildT:MonadTrans:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:lift">lift</a> :: <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m a -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a <a href="#v:lift" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:BuildT:TensorKind:2" class="instance expander" onclick="toggleSection('i:id:BuildT:TensorKind:2')"></span> <a href="TensorFlow-Tensor.html#t:TensorKind">TensorKind</a> <a href="TensorFlow-Build.html#t:Build">Build</a></span> <a href="src/TensorFlow.Tensor.html#line-191" class="link">Source</a> <a href="#t:TensorKind" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:BuildT:TensorKind:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toBuild">toBuild</a> :: <a href="TensorFlow-Build.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> a <a href="src/TensorFlow.Tensor.html#toBuild" class="link">Source</a> <a href="#v:toBuild" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:BuildT:MonadState:3" class="instance expander" onclick="toggleSection('i:id:BuildT:MonadState:3')"></span> <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; MonadState <a href="TensorFlow-Build.html#t:GraphState">GraphState</a> (<a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m)</span> <a href="src/TensorFlow.Build.html#line-195" class="link">Source</a> <a href="#t:BuildT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:BuildT:MonadState:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:get">get</a> :: <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m <a href="TensorFlow-Build.html#t:GraphState">GraphState</a></p><p class="src"><a href="#v:put">put</a> :: <a href="TensorFlow-Build.html#t:GraphState">GraphState</a> -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m ()</p><p class="src"><a href="#v:state">state</a> :: (<a href="TensorFlow-Build.html#t:GraphState">GraphState</a> -&gt; (a, <a href="TensorFlow-Build.html#t:GraphState">GraphState</a>)) -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a</p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:BuildT:Monad:4" class="instance expander" onclick="toggleSection('i:id:BuildT:Monad:4')"></span> <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> (<a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m)</span> <a href="src/TensorFlow.Build.html#line-194" class="link">Source</a> <a href="#t:BuildT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:BuildT:Monad:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-62--62--61-">(&gt;&gt;=)</a> :: <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a -&gt; (a -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m b) -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m b <a href="#v:-62--62--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62--62-">(&gt;&gt;)</a> :: <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m b -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m b <a href="#v:-62--62-" class="selflink">#</a></p><p class="src"><a href="#v:return">return</a> :: a -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a <a href="#v:return" class="selflink">#</a></p><p class="src"><a href="#v:fail">fail</a> :: <a href="../base-4.10.1.0/Data-String.html#t:String">String</a> -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a <a href="#v:fail" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:BuildT:Functor:5" class="instance expander" onclick="toggleSection('i:id:BuildT:Functor:5')"></span> <a href="../base-4.10.1.0/Data-Functor.html#t:Functor">Functor</a> m =&gt; <a href="../base-4.10.1.0/Data-Functor.html#t:Functor">Functor</a> (<a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m)</span> <a href="src/TensorFlow.Build.html#line-194" class="link">Source</a> <a href="#t:BuildT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:BuildT:Functor:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fmap">fmap</a> :: (a -&gt; b) -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m b <a href="#v:fmap" class="selflink">#</a></p><p class="src"><a href="#v:-60--36-">(&lt;$)</a> :: a -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m b -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a <a href="#v:-60--36-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:BuildT:MonadFix:6" class="instance expander" onclick="toggleSection('i:id:BuildT:MonadFix:6')"></span> <a href="../base-4.10.1.0/Control-Monad-Fix.html#t:MonadFix">MonadFix</a> m =&gt; <a href="../base-4.10.1.0/Control-Monad-Fix.html#t:MonadFix">MonadFix</a> (<a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m)</span> <a href="src/TensorFlow.Build.html#line-196" class="link">Source</a> <a href="#t:BuildT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:BuildT:MonadFix:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:mfix">mfix</a> :: (a -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a) -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a <a href="#v:mfix" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:BuildT:Applicative:7" class="instance expander" onclick="toggleSection('i:id:BuildT:Applicative:7')"></span> <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="../base-4.10.1.0/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m)</span> <a href="src/TensorFlow.Build.html#line-194" class="link">Source</a> <a href="#t:BuildT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:BuildT:Applicative:7" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:pure">pure</a> :: a -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a <a href="#v:pure" class="selflink">#</a></p><p class="src"><a href="#v:-60--42--62-">(&lt;*&gt;)</a> :: <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m (a -&gt; b) -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m b <a href="#v:-60--42--62-" class="selflink">#</a></p><p class="src"><a href="#v:liftA2">liftA2</a> :: (a -&gt; b -&gt; c) -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m b -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m c <a href="#v:liftA2" class="selflink">#</a></p><p class="src"><a href="#v:-42--62-">(*&gt;)</a> :: <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m b -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m b <a href="#v:-42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-60--42-">(&lt;*)</a> :: <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m b -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a <a href="#v:-60--42-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:BuildT:MonadIO:8" class="instance expander" onclick="toggleSection('i:id:BuildT:MonadIO:8')"></span> <a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m =&gt; <a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> (<a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m)</span> <a href="src/TensorFlow.Build.html#line-194" class="link">Source</a> <a href="#t:BuildT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:BuildT:MonadIO:8" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:liftIO">liftIO</a> :: <a href="../base-4.10.1.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a <a href="#v:liftIO" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:BuildT:MonadThrow:9" class="instance expander" onclick="toggleSection('i:id:BuildT:MonadThrow:9')"></span> MonadThrow m =&gt; MonadThrow (<a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m)</span> <a href="src/TensorFlow.Build.html#line-195" class="link">Source</a> <a href="#t:BuildT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:BuildT:MonadThrow:9" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:throwM">throwM</a> :: <a href="../base-4.10.1.0/Control-Exception-Base.html#t:Exception">Exception</a> e =&gt; e -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a</p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:BuildT:MonadMask:10" class="instance expander" onclick="toggleSection('i:id:BuildT:MonadMask:10')"></span> MonadMask m =&gt; MonadMask (<a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m)</span> <a href="src/TensorFlow.Build.html#line-195" class="link">Source</a> <a href="#t:BuildT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:BuildT:MonadMask:10" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:mask">mask</a> :: ((<span class="keyword">forall</span> a. <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a) -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m b) -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m b</p><p class="src"><a href="#v:uninterruptibleMask">uninterruptibleMask</a> :: ((<span class="keyword">forall</span> a. <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a) -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m b) -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m b</p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:BuildT:MonadCatch:11" class="instance expander" onclick="toggleSection('i:id:BuildT:MonadCatch:11')"></span> MonadCatch m =&gt; MonadCatch (<a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m)</span> <a href="src/TensorFlow.Build.html#line-195" class="link">Source</a> <a href="#t:BuildT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:BuildT:MonadCatch:11" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:catch">catch</a> :: <a href="../base-4.10.1.0/Control-Exception-Base.html#t:Exception">Exception</a> e =&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a -&gt; (e -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a) -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a</p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:BuildT:MonadBuild:12" class="instance expander" onclick="toggleSection('i:id:BuildT:MonadBuild:12')"></span> <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> (<a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m)</span> <a href="src/TensorFlow.Build.html#line-215" class="link">Source</a> <a href="#t:BuildT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:BuildT:MonadBuild:12" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:build">build</a> :: <a href="TensorFlow-Build.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a <a href="src/TensorFlow.Build.html#build" class="link">Source</a> <a href="#v:build" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:BuildT:PureResult:13" class="instance expander" onclick="toggleSection('i:id:BuildT:PureResult:13')"></span> <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-Build.html#t:Build">Build</a> as)</span> <a href="src/TensorFlow.BuildOp.html#line-270" class="link">Source</a> <a href="#t:PureResult" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:BuildT:PureResult:13" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:pureResult">pureResult</a> :: <a href="../transformers-0.5.2.0/Control-Monad-Trans-Reader.html#t:ReaderT">ReaderT</a> <a href="../base-4.10.1.0/Data-Kind.html#t:-42-">*</a> (<a href="TensorFlow-Build.html#t:Build">Build</a> <a href="TensorFlow-Output.html#t:OpDef">OpDef</a>) (<a href="../transformers-0.5.2.0/Control-Monad-Trans-State-Strict.html#t:State">State</a> ResultState) (<a href="TensorFlow-Tensor.html#t:TensorList">TensorList</a> <a href="TensorFlow-Build.html#t:Build">Build</a> as) <a href="src/TensorFlow.BuildOp.html#pureResult" class="link">Source</a> <a href="#v:pureResult" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:BuildT:PureResult:14" class="instance expander" onclick="toggleSection('i:id:BuildT:PureResult:14')"></span> <a href="TensorFlow-BuildOp.html#t:PureResult">PureResult</a> (<a href="TensorFlow-Tensor.html#t:Tensor">Tensor</a> <a href="TensorFlow-Build.html#t:Build">Build</a> a)</span> <a href="src/TensorFlow.BuildOp.html#line-178" class="link">Source</a> <a href="#t:PureResult" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:BuildT:PureResult:14" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:pureResult">pureResult</a> :: <a href="../transformers-0.5.2.0/Control-Monad-Trans-Reader.html#t:ReaderT">ReaderT</a> <a href="../base-4.10.1.0/Data-Kind.html#t:-42-">*</a> (<a href="TensorFlow-Build.html#t:Build">Build</a> <a href="TensorFlow-Output.html#t:OpDef">OpDef</a>) (<a href="../transformers-0.5.2.0/Control-Monad-Trans-State-Strict.html#t:State">State</a> ResultState) (<a href="TensorFlow-Tensor.html#t:Tensor">Tensor</a> <a href="TensorFlow-Build.html#t:Build">Build</a> a) <a href="src/TensorFlow.BuildOp.html#pureResult" class="link">Source</a> <a href="#v:pureResult" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:Build" class="def">Build</a> = <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> <a href="../base-4.10.1.0/Data-Functor-Identity.html#t:Identity">Identity</a> <a href="src/TensorFlow.Build.html#Build" class="link">Source</a> <a href="#t:Build" class="selflink">#</a></p><div class="doc"><p>An action for building nodes in a TensorFlow graph.</p></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a id="t:MonadBuild" class="def">MonadBuild</a> m <span class="keyword">where</span> <a href="src/TensorFlow.Build.html#MonadBuild" class="link">Source</a> <a href="#t:MonadBuild" class="selflink">#</a></p><div class="doc"><p>Lift a <code><a href="TensorFlow-Build.html#t:Build">Build</a></code> action into a monad, including any explicit op renderings.</p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="TensorFlow-Build.html#v:build">build</a></p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a id="v:build" class="def">build</a> :: <a href="TensorFlow-Build.html#t:Build">Build</a> a -&gt; m a <a href="src/TensorFlow.Build.html#build" class="link">Source</a> <a href="#v:build" class="selflink">#</a></p></div><div class="subs instances"><p id="control.i:MonadBuild" class="caption collapser" onclick="toggleSection('i:MonadBuild')">Instances</p><div id="section.i:MonadBuild" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadBuild:MonadBuild:1" class="instance expander" onclick="toggleSection('i:ic:MonadBuild:MonadBuild:1')"></span> <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> (<a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m)</span> <a href="src/TensorFlow.Build.html#line-215" class="link">Source</a> <a href="#t:MonadBuild" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:MonadBuild:MonadBuild:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:build">build</a> :: <a href="TensorFlow-Build.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a <a href="src/TensorFlow.Build.html#build" class="link">Source</a> <a href="#v:build" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadBuild:MonadBuild:2" class="instance expander" onclick="toggleSection('i:ic:MonadBuild:MonadBuild:2')"></span> <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> (<a href="TensorFlow-Session.html#t:SessionT">SessionT</a> m)</span> <a href="src/TensorFlow.Build.html#line-131" class="link">Source</a> <a href="#t:MonadBuild" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:MonadBuild:MonadBuild:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:build">build</a> :: <a href="TensorFlow-Build.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Session.html#t:SessionT">SessionT</a> m a <a href="src/TensorFlow.Build.html#build" class="link">Source</a> <a href="#v:build" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:addInitializer" class="def">addInitializer</a> :: <a href="TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m =&gt; <a href="TensorFlow-Build.html#t:ControlNode">ControlNode</a> -&gt; m () <a href="src/TensorFlow.Build.html#addInitializer" class="link">Source</a> <a href="#v:addInitializer" class="selflink">#</a></p><div class="doc"><p>Registers the given node to be executed before the next
<code><a href="TensorFlow-Session.html#v:run">run</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:hoistBuildT" class="def">hoistBuildT</a> :: (<span class="keyword">forall</span> a. m a -&gt; n a) -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m b -&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> n b <a href="src/TensorFlow.Build.html#hoistBuildT" class="link">Source</a> <a href="#v:hoistBuildT" class="selflink">#</a></p><div class="doc"><p>This is Control.Monad.Morph.hoist sans the dependency.</p></div></div><div class="top"><p class="src"><a id="v:evalBuildT" class="def">evalBuildT</a> :: <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a -&gt; m a <a href="src/TensorFlow.Build.html#evalBuildT" class="link">Source</a> <a href="#v:evalBuildT" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:runBuildT" class="def">runBuildT</a> :: <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a -&gt; m (a, <a href="TensorFlow-Build.html#t:GraphState">GraphState</a>) <a href="src/TensorFlow.Build.html#runBuildT" class="link">Source</a> <a href="#v:runBuildT" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:asGraphDef" class="def">asGraphDef</a> :: <a href="TensorFlow-Build.html#t:Build">Build</a> a -&gt; <a href="../tensorflow-proto-0.2.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef">GraphDef</a> <a href="src/TensorFlow.Build.html#asGraphDef" class="link">Source</a> <a href="#v:asGraphDef" class="selflink">#</a></p><div class="doc"><p>Produce a GraphDef proto representation of the nodes that are rendered in
the given <code><a href="TensorFlow-Build.html#t:Build">Build</a></code> action.</p></div></div><div class="top"><p class="src"><a id="v:addGraphDef" class="def">addGraphDef</a> :: <a href="TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m =&gt; <a href="../tensorflow-proto-0.2.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef">GraphDef</a> -&gt; m () <a href="src/TensorFlow.Build.html#addGraphDef" class="link">Source</a> <a href="#v:addGraphDef" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:flushInitializers" class="def">flushInitializers</a> :: <a href="../base-4.10.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m [<a href="TensorFlow-Output.html#t:NodeName">NodeName</a>] <a href="src/TensorFlow.Build.html#flushInitializers" class="link">Source</a> <a href="#v:flushInitializers" class="selflink">#</a></p><div class="doc"><p>Get all the initializers that have accumulated so far, and clear
that buffer.</p></div></div><div class="top"><p class="src"><a id="v:flushNodeBuffer" class="def">flushNodeBuffer</a> :: <a href="TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m =&gt; m [<a href="../tensorflow-proto-0.2.0.0/Proto-Tensorflow-Core-Framework-NodeDef.html#t:NodeDef">NodeDef</a>] <a href="src/TensorFlow.Build.html#flushNodeBuffer" class="link">Source</a> <a href="#v:flushNodeBuffer" class="selflink">#</a></p><div class="doc"><p>Get all the NodeDefs that have accumulated so far, and clear that buffer.</p></div></div><div class="top"><p class="src"><a id="v:summaries" class="def">summaries</a> :: Lens' <a href="TensorFlow-Build.html#t:GraphState">GraphState</a> [<a href="TensorFlow-Output.html#t:Output">Output</a>] <a href="src/TensorFlow.Build.html#summaries" class="link">Source</a> <a href="#v:summaries" class="selflink">#</a></p></div><h1 id="g:4">Creating and looking up Ops</h1><div class="top"><p class="src"><a id="v:getOrAddOp" class="def">getOrAddOp</a> :: <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> <a href="TensorFlow-Output.html#t:NodeName">NodeName</a> <a href="src/TensorFlow.Build.html#getOrAddOp" class="link">Source</a> <a href="#v:getOrAddOp" class="selflink">#</a></p><div class="doc"><p>Render the given op if it hasn't been rendered already, and return its
name.</p></div></div><div class="top"><p class="src"><a id="v:addNewOp" class="def">addNewOp</a> :: <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> <a href="TensorFlow-Output.html#t:NodeName">NodeName</a> <a href="src/TensorFlow.Build.html#addNewOp" class="link">Source</a> <a href="#v:addNewOp" class="selflink">#</a></p><div class="doc"><p>Add a new node for a given <code><a href="TensorFlow-Output.html#t:OpDef">OpDef</a></code>. This is used for making &quot;stateful&quot; ops
which are not safe to dedup (e.g, &quot;variable&quot; and &quot;assign&quot;).</p></div></div><div class="top"><p class="src"><a id="v:encodeOutput" class="def">encodeOutput</a> :: <a href="TensorFlow-Output.html#t:Output">Output</a> -&gt; Text <a href="src/TensorFlow.Build.html#encodeOutput" class="link">Source</a> <a href="#v:encodeOutput" class="selflink">#</a></p><div class="doc"><p>Turn an <code><a href="TensorFlow-Output.html#t:Output">Output</a></code> into a string representation for the TensorFlow
foreign APIs.</p></div></div><div class="top"><p class="src"><a id="v:lookupNode" class="def">lookupNode</a> :: <a href="TensorFlow-Output.html#t:NodeName">NodeName</a> -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> <a href="../tensorflow-proto-0.2.0.0/Proto-Tensorflow-Core-Framework-NodeDef.html#t:NodeDef">NodeDef</a> <a href="src/TensorFlow.Build.html#lookupNode" class="link">Source</a> <a href="#v:lookupNode" class="selflink">#</a></p></div><h1 id="g:5">Modifying all nodes in a Build action</h1><div class="top"><p class="src"><a id="v:withStateLens" class="def">withStateLens</a> :: <a href="TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m =&gt; Lens' <a href="TensorFlow-Build.html#t:GraphState">GraphState</a> a -&gt; (a -&gt; a) -&gt; m b -&gt; m b <a href="src/TensorFlow.Build.html#withStateLens" class="link">Source</a> <a href="#v:withStateLens" class="selflink">#</a></p><div class="doc"><p>Modify some part of the state, run an action, and restore the state
after that action is done.</p></div></div><div class="top"><p class="src"><a id="v:withDevice" class="def">withDevice</a> :: <a href="TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m =&gt; <a href="../base-4.10.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="TensorFlow-Output.html#t:Device">Device</a> -&gt; m a -&gt; m a <a href="src/TensorFlow.Build.html#withDevice" class="link">Source</a> <a href="#v:withDevice" class="selflink">#</a></p><div class="doc"><p>Set a device for all nodes rendered in the given <code><a href="TensorFlow-Build.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 id="v:withNameScope" class="def">withNameScope</a> :: <a href="TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m =&gt; Text -&gt; m a -&gt; m a <a href="src/TensorFlow.Build.html#withNameScope" class="link">Source</a> <a href="#v:withNameScope" class="selflink">#</a></p><div class="doc"><p>Prepend a scope to all nodes rendered in the given <code><a href="TensorFlow-Build.html#t:Build">Build</a></code> action.</p></div></div><div class="top"><p class="src"><a id="v:withNodeDependencies" class="def">withNodeDependencies</a> :: <a href="TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m =&gt; <a href="../containers-0.5.10.2/Data-Set-Internal.html#t:Set">Set</a> <a href="TensorFlow-Output.html#t:NodeName">NodeName</a> -&gt; m a -&gt; m a <a href="src/TensorFlow.Build.html#withNodeDependencies" class="link">Source</a> <a href="#v:withNodeDependencies" class="selflink">#</a></p><div class="doc"><p>Add control inputs to all nodes rendered in the given <code><a href="TensorFlow-Build.html#t:Build">Build</a></code> action.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.18.1</p></div></body></html>