1
0
Fork 0
mirror of https://github.com/tensorflow/haskell.git synced 2024-11-27 21:39:44 +01:00
tensorflow-haskell/docs/haddock/tensorflow-0.1.0.0/TensorFlow-Build.html
2016-11-23 10:55:35 -08:00

27 lines
No EOL
32 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 type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_TensorFlow-Build.html");};
//]]>
</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.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.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><li><a href="#g:6">Internal Summary related bits.</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:Op">Op</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> :: <a href="../text-1.2.2.1/Data-Text.html#t:Text">Text</a> -&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> :: <a href="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a> <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> :: <a href="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a> <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; <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:Lens-39-">Lens'</a> <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> a</li><li class="src short"><a href="#v:opInputs">opInputs</a> :: <a href="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a> <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> :: <a href="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a> <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:render">render</a> :: <a href="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> (<a href="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a)</li><li class="src short"><a href="#v:renderNodeName">renderNodeName</a> :: <a href="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v 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:renderedNodeDefs">renderedNodeDefs</a> :: <a href="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a> <a href="TensorFlow-Build.html#t:GraphState">GraphState</a> (<a href="../containers-0.5.6.2/Data-Map-Lazy.html#t:Map">Map</a> <a href="TensorFlow-Output.html#t:NodeName">NodeName</a> <a href="../tensorflow-proto-0.1.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.8.2.0/Data-Functor-Identity.html#t:Identity">Identity</a></li><li class="src short"><a href="#v:addInitializer">addInitializer</a> :: <a href="TensorFlow-Build.html#t:ControlNode">ControlNode</a> -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> ()</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.8.2.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.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-Build.html#t:Build">Build</a> ()</li><li class="src short"><a href="#v:flushInitializers">flushInitializers</a> :: <a href="../base-4.8.2.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="../base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m [<a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-NodeDef.html#t:NodeDef">NodeDef</a>]</li><li class="src short"><a href="#v:getOrAddOp">getOrAddOp</a> :: <a href="TensorFlow-Output.html#t:Op">Op</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-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-NodeDef.html#t:NodeDef">NodeDef</a></li><li class="src short"><a href="#v:renderOutput">renderOutput</a> :: <a href="TensorFlow-Output.html#t:Output">Output</a> -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> <a href="../text-1.2.2.1/Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:colocateWith">colocateWith</a> :: <span class="keyword">forall</span> a v b. <a href="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v b -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> a</li><li class="src short"><a href="#v:withStateLens">withStateLens</a> :: <a href="../lens-family-1.2.0/Lens-Family2-State-Lazy.html#t:MonadState">MonadState</a> s m =&gt; <a href="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a> s a -&gt; (a -&gt; a) -&gt; m b -&gt; m b</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-Output.html#t:Device">Device</a> -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Build.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-Build.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> a</li><li class="src short"><a href="#v:withNodeDependencies">withNodeDependencies</a> :: <a href="../containers-0.5.6.2/Data-Set.html#t:Set">Set</a> <a href="TensorFlow-Output.html#t:NodeName">NodeName</a> -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> a</li><li class="src short"><a href="#v:addSummary">addSummary</a> :: <a href="TensorFlow-Build.html#t:SummaryTensor">SummaryTensor</a> -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> ()</li><li class="src short"><span class="keyword">type</span> <a href="#t:SummaryTensor">SummaryTensor</a> = <a href="TensorFlow-Tensor.html#t:Tensor">Tensor</a> <a href="TensorFlow-Tensor.html#t:Value">Value</a> <a href="../bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:collectAllSummaries">collectAllSummaries</a> :: <a href="../base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m [<a href="TensorFlow-Build.html#t:SummaryTensor">SummaryTensor</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 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 constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="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><dl><dt class="src"><a name="v:unControlNode" class="def">unControlNode</a> :: <a href="TensorFlow-Output.html#t:Op">Op</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: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-Build.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-Build.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-Nodes.html#t:Nodes">Nodes</a> <a href="TensorFlow-Build.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-Nodes.html#t:Fetchable">Fetchable</a> <a href="TensorFlow-Build.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:Unique" class="def">Unique</a> <a href="src/TensorFlow-Build.html#Unique" class="link">Source</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"><a href="../base-4.8.2.0/Prelude.html#t:Enum">Enum</a> <a href="TensorFlow-Build.html#t:Unique">Unique</a></span> <a href="src/TensorFlow-Build.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="../base-4.8.2.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-98" 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-Build.html#t:Unique">Unique</a></span> <a href="src/TensorFlow-Build.html#line-98" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:2">Ops</h1><div class="top"><p class="src"><a name="v:explicitName" class="def">explicitName</a> :: <a href="../text-1.2.2.1/Data-Text.html#t:Text">Text</a> -&gt; <a href="TensorFlow-Output.html#t:PendingNodeName">PendingNodeName</a> <a href="src/TensorFlow-Build.html#explicitName" class="link">Source</a></p></div><div class="top"><p class="src"><a name="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></p></div><div class="top"><p class="src"><a name="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></p></div><div class="top"><p class="src"><a name="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></p></div><div class="top"><p class="src"><a name="v:opName" class="def">opName</a> :: <a href="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a> <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></p></div><div class="top"><p class="src"><a name="v:opType" class="def">opType</a> :: <a href="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a> <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></p></div><div class="top"><p class="src"><a name="v:opAttr" class="def">opAttr</a> :: <a href="TensorFlow-Types.html#t:Attribute">Attribute</a> a =&gt; <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:Lens-39-">Lens'</a> <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> a <a href="src/TensorFlow-Output.html#opAttr" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:opInputs" class="def">opInputs</a> :: <a href="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a> <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></p></div><div class="top"><p class="src"><a name="v:opControlInputs" class="def">opControlInputs</a> :: <a href="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a> <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></p></div><h1 id="g:3">The Build monad</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:GraphState" class="def">GraphState</a> <a href="src/TensorFlow-Build.html#GraphState" class="link">Source</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"><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-Build.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></table></div></div></div><div class="top"><p class="src"><a name="v:render" class="def">render</a> :: <a href="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> (<a href="TensorFlow-Tensor.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-Tensor.html#t:Tensor">Tensor</a></code>, fixing its name, scope, device and control inputs from
the <code><a href="TensorFlow-Build.html#t:Build">Build</a></code> context. Also renders any dependencies of the <code><a href="TensorFlow-Tensor.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-Tensor.html#t:Tensor">Tensor</a></code> in two different contexts
may result in two different <code><a href="TensorFlow-Tensor.html#t:Tensor">Tensor</a></code>s.</p></div></div><div class="top"><p class="src"><a name="v:renderNodeName" class="def">renderNodeName</a> :: <a href="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v 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#renderNodeName" class="link">Source</a></p><div class="doc"><p>Render a <code><a href="TensorFlow-Tensor.html#t:Tensor">Tensor</a></code> and get its node's name.</p></div></div><div class="top"><p class="src"><a name="v:renderedNodeDefs" class="def">renderedNodeDefs</a> :: <a href="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a> <a href="TensorFlow-Build.html#t:GraphState">GraphState</a> (<a href="../containers-0.5.6.2/Data-Map-Lazy.html#t:Map">Map</a> <a href="TensorFlow-Output.html#t:NodeName">NodeName</a> <a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-NodeDef.html#t:NodeDef">NodeDef</a>) <a href="src/TensorFlow-Build.html#renderedNodeDefs" class="link">Source</a></p></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-Build.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-Build.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-Build.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-Build.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-Build.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-Build.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-Build.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"><span class="keyword">type</span> <a name="t:Build" class="def">Build</a> = <a href="TensorFlow-Build.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"><a name="v:addInitializer" class="def">addInitializer</a> :: <a href="TensorFlow-Build.html#t:ControlNode">ControlNode</a> -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> () <a href="src/TensorFlow-Build.html#addInitializer" class="link">Source</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 name="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></p><div class="doc"><p>This is Control.Monad.Morph.hoist sans the dependency.</p></div></div><div class="top"><p class="src"><a name="v:evalBuildT" class="def">evalBuildT</a> :: <a href="../base-4.8.2.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></p></div><div class="top"><p class="src"><a name="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></p></div><div class="top"><p class="src"><a name="v:asGraphDef" class="def">asGraphDef</a> :: <a href="TensorFlow-Build.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-Build.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-Build.html#t:Build">Build</a> () <a href="src/TensorFlow-Build.html#addGraphDef" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:flushInitializers" class="def">flushInitializers</a> :: <a href="../base-4.8.2.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></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 name="v:flushNodeBuffer" class="def">flushNodeBuffer</a> :: <a href="../base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m [<a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-NodeDef.html#t:NodeDef">NodeDef</a>] <a href="src/TensorFlow-Build.html#flushNodeBuffer" class="link">Source</a></p><div class="doc"><p>Get all the NodeDefs that have accumulated so far, and clear that buffer.</p></div></div><h1 id="g:4">Creating and looking up Ops</h1><div class="top"><p class="src"><a name="v:getOrAddOp" class="def">getOrAddOp</a> :: <a href="TensorFlow-Output.html#t:Op">Op</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></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 name="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-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-NodeDef.html#t:NodeDef">NodeDef</a> <a href="src/TensorFlow-Build.html#addNewOp" class="link">Source</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 name="v:renderOutput" class="def">renderOutput</a> :: <a href="TensorFlow-Output.html#t:Output">Output</a> -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> <a href="../text-1.2.2.1/Data-Text.html#t:Text">Text</a> <a href="src/TensorFlow-Build.html#renderOutput" class="link">Source</a></p><div class="doc"><p>Render an <code><a href="TensorFlow-Output.html#t:Output">Output</a></code> and return a string representation for the TensorFlow
foreign APIs.</p></div></div><h1 id="g:5">Modifying all nodes in a Build action</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-Tensor.html#t:Tensor">Tensor</a> v b -&gt; <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-Build.html#colocateWith" class="link">Source</a></p><div class="doc"><p>Places all nodes rendered in the given <code><a href="TensorFlow-Build.html#t:Build">Build</a></code> action on the same
device as the given Tensor (see also <code><a href="TensorFlow-Build.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"><a name="v:withStateLens" class="def">withStateLens</a> :: <a href="../lens-family-1.2.0/Lens-Family2-State-Lazy.html#t:MonadState">MonadState</a> s m =&gt; <a href="../lens-family-1.2.0/Lens-Family2-Unchecked.html#t:Lens-39-">Lens'</a> s a -&gt; (a -&gt; a) -&gt; m b -&gt; m b <a href="src/TensorFlow-Build.html#withStateLens" class="link">Source</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 name="v:withDevice" class="def">withDevice</a> :: <a href="../base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="TensorFlow-Output.html#t:Device">Device</a> -&gt; <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-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-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 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-Build.html#t:Build">Build</a> a -&gt; <a href="TensorFlow-Build.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-Build.html#t:Build">Build</a></code> action.</p></div></div><div class="top"><p class="src"><a name="v:withNodeDependencies" class="def">withNodeDependencies</a> :: <a href="../containers-0.5.6.2/Data-Set.html#t:Set">Set</a> <a href="TensorFlow-Output.html#t:NodeName">NodeName</a> -&gt; <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-Build.html#withNodeDependencies" class="link">Source</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><h1 id="g:6">Internal Summary related bits.</h1><div class="top"><p class="src"><a name="v:addSummary" class="def">addSummary</a> :: <a href="TensorFlow-Build.html#t:SummaryTensor">SummaryTensor</a> -&gt; <a href="TensorFlow-Build.html#t:Build">Build</a> () <a href="src/TensorFlow-Build.html#addSummary" class="link">Source</a></p><div class="doc"><p>Records the given summary action in Build for retrieval with
<code><a href="TensorFlow-Build.html#v:collectAllSummaries">collectAllSummaries</a></code>. The summary op is required to produce a
Summary protocol buffer in string form. For safety, use the
pre-composed functions: Logging.scalarSummary and
Logging.histogramSummary.</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:SummaryTensor" class="def">SummaryTensor</a> = <a href="TensorFlow-Tensor.html#t:Tensor">Tensor</a> <a href="TensorFlow-Tensor.html#t:Value">Value</a> <a href="../bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/TensorFlow-Build.html#SummaryTensor" class="link">Source</a></p><div class="doc"><p>Synonym for the tensors that return serialized Summary proto.</p></div></div><div class="top"><p class="src"><a name="v:collectAllSummaries" class="def">collectAllSummaries</a> :: <a href="../base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m [<a href="TensorFlow-Build.html#t:SummaryTensor">SummaryTensor</a>] <a href="src/TensorFlow-Build.html#collectAllSummaries" class="link">Source</a></p><div class="doc"><p>Retrieves the summary ops collected thus far. Typically this only
happens once, but if <code><a href="TensorFlow-Session.html#v:buildWithSummary">buildWithSummary</a></code> is used
repeatedly, the values accumulate.</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>