mirror of
https://github.com/tensorflow/haskell.git
synced 2024-11-05 18:49:41 +01:00
27 lines
No EOL
27 KiB
HTML
27 lines
No EOL
27 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="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> :: Text -> <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> -> <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> -> <a href="TensorFlow-Output.html#t:OpType">OpType</a> -> <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 => Text -> 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:render">render</a> :: <a href="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a -> <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 -> <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> :: Lens' <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> -> <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 -> n a) -> <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m b -> <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 => <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a -> m a</li><li class="src short"><a href="#v:runBuildT">runBuildT</a> :: <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a -> 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 -> <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> -> <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 => <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 => <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> -> <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> -> <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> -> <a href="TensorFlow-Build.html#t:Build">Build</a> Text</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 -> <a href="TensorFlow-Build.html#t:Build">Build</a> a -> <a href="TensorFlow-Build.html#t:Build">Build</a> a</li><li class="src short"><a href="#v:withStateLens">withStateLens</a> :: MonadState s m => Lens' s a -> (a -> a) -> m b -> 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> -> <a href="TensorFlow-Build.html#t:Build">Build</a> a -> <a href="TensorFlow-Build.html#t:Build">Build</a> a</li><li class="src short"><a href="#v:withNameScope">withNameScope</a> :: Text -> <a href="TensorFlow-Build.html#t:Build">Build</a> a -> <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> -> <a href="TensorFlow-Build.html#t:Build">Build</a> a -> <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> -> <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 => <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></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"> </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"> </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></td><td class="doc empty"> </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></td><td class="doc empty"> </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></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left">(~) * a () => <a href="TensorFlow-Nodes.html#t:Fetchable">Fetchable</a> <a href="TensorFlow-Build.html#t:ControlNode">ControlNode</a> a</span></td><td class="doc empty"> </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></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></td><td class="doc empty"> </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></td><td class="doc empty"> </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></td><td class="doc empty"> </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> :: Text -> <a href="TensorFlow-Output.html#t:PendingNodeName">PendingNodeName</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></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> -> <a href="TensorFlow-Output.html#t:OpDef">OpDef</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> -> <a href="TensorFlow-Output.html#t:OpType">OpType</a> -> <a href="TensorFlow-Output.html#t:OpDef">OpDef</a></p></div><div class="top"><p class="src"><a name="v:opName" class="def">opName</a> :: Lens' <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> <a href="TensorFlow-Output.html#t:PendingNodeName">PendingNodeName</a></p></div><div class="top"><p class="src"><a name="v:opType" class="def">opType</a> :: Lens' <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> <a href="TensorFlow-Output.html#t:OpType">OpType</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 => Text -> Lens' <a href="TensorFlow-Output.html#t:OpDef">OpDef</a> a</p></div><div class="top"><p class="src"><a name="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>]</p></div><div class="top"><p class="src"><a name="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>]</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></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 => MonadState <a href="TensorFlow-Build.html#t:GraphState">GraphState</a> (<a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m)</span></td><td class="doc empty"> </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 -> <a href="TensorFlow-Build.html#t:Build">Build</a> (<a href="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v 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 >=> 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 -> <a href="TensorFlow-Build.html#t:Build">Build</a> <a href="TensorFlow-Output.html#t:NodeName">NodeName</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> :: Lens' <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>)</p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:BuildT" class="def">BuildT</a> m a</p><div class="doc"><p>An action for building nodes in a TensorFlow graph.
|
|
Used to manage build state internally as part of the <code>Session</code> monad.</p></div><div class="subs instances"><p id="control.i:BuildT" class="caption collapser" onclick="toggleSection('i:BuildT')">Instances</p><div id="section.i:BuildT" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="../transformers-0.4.2.0/Control-Monad-Trans-Class.html#t:MonadTrans">MonadTrans</a> <a href="TensorFlow-Build.html#t:BuildT">BuildT</a></span></td><td class="doc empty"> </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 => MonadState <a href="TensorFlow-Build.html#t:GraphState">GraphState</a> (<a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m)</span></td><td class="doc empty"> </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 => <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></td><td class="doc empty"> </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 => <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></td><td class="doc empty"> </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 => <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></td><td class="doc empty"> </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 => <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></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-BuildOp.html#t:OpResult">OpResult</a> a => <a href="TensorFlow-BuildOp.html#t:BuildOp">BuildOp</a> (<a href="TensorFlow-Build.html#t:Build">Build</a> a)</span></td><td class="doc empty"> </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></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> -> <a href="TensorFlow-Build.html#t:Build">Build</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 -> n a) -> <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m b -> <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> n b</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 => <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m a -> m 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 -> m (a, <a href="TensorFlow-Build.html#t:GraphState">GraphState</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 -> <a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-Graph.html#t:GraphDef">GraphDef</a></p><div class="doc"><p>Produce a GraphDef proto representation of the nodes that are rendered in
|
|
the given <code><a href="TensorFlow-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> -> <a href="TensorFlow-Build.html#t:Build">Build</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 => <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m [<a href="TensorFlow-Output.html#t:NodeName">NodeName</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 => <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>]</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> -> <a href="TensorFlow-Build.html#t:Build">Build</a> <a href="TensorFlow-Output.html#t:NodeName">NodeName</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> -> <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></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 "stateful" ops
|
|
which are not safe to dedup (e.g, "variable" and "assign").</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> -> <a href="TensorFlow-Build.html#t:Build">Build</a> Text</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 -> <a href="TensorFlow-Build.html#t:Build">Build</a> a -> <a href="TensorFlow-Build.html#t:Build">Build</a> 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> :: MonadState s m => Lens' s a -> (a -> a) -> m b -> m b</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> -> <a href="TensorFlow-Build.html#t:Build">Build</a> a -> <a href="TensorFlow-Build.html#t:Build">Build</a> 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> :: Text -> <a href="TensorFlow-Build.html#t:Build">Build</a> a -> <a href="TensorFlow-Build.html#t:Build">Build</a> 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> -> <a href="TensorFlow-Build.html#t:Build">Build</a> a -> <a href="TensorFlow-Build.html#t:Build">Build</a> 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> -> <a href="TensorFlow-Build.html#t:Build">Build</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></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 => <a href="TensorFlow-Build.html#t:BuildT">BuildT</a> m [<a href="TensorFlow-Build.html#t:SummaryTensor">SummaryTensor</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> |