<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"/><title>TensorFlow.Tensor</title><linkhref="ocean.css"rel="stylesheet"type="text/css"title="Ocean"/><scriptsrc="haddock-util.js"type="text/javascript"></script><scripttype="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_TensorFlow-Tensor.html");};
</script></head><body><divid="package-header"><ulclass="links"id="page-menu"><li><ahref="index.html">Contents</a></li><li><ahref="doc-index.html">Index</a></li></ul><pclass="caption">tensorflow-0.1.0.0: TensorFlow bindings.</p></div><divid="content"><divid="module-header"><tableclass="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><pclass="caption">TensorFlow.Tensor</p></div><divid="synopsis"><pid="control.syn"class="caption expander"onclick="toggleSection('syn')">Synopsis</p><ulid="section.syn"class="hide"onclick="toggleSection('syn')"><liclass="src short"><spanclass="keyword">data</span><ahref="#t:Tensor">Tensor</a> v a = <ahref="#v:Tensor">Tensor</a> (<ahref="TensorFlow-Tensor.html#t:TensorKind">TensorKind</a> v) <ahref="TensorFlow-Output.html#t:Output">Output</a></li><liclass="src short"><spanclass="keyword">data</span><ahref="#t:Value">Value</a></li><liclass="src short"><spanclass="keyword">data</span><ahref="#t:Ref">Ref</a></li><liclass="src short"><spanclass="keyword">data</span><ahref="#t:TensorKind">TensorKind</a> v <spanclass="keyword">where</span><ulclass="subs"><li><ahref="#v:ValueKind">ValueKind</a> :: <ahref="TensorFlow-Tensor.html#t:TensorKind">TensorKind</a><ahref="TensorFlow-Tensor.html#t:Value">Value</a></li><li><ahref="#v:RefKind">RefKind</a> :: <ahref="TensorFlow-Tensor.html#t:TensorKind">TensorKind</a><ahref="TensorFlow-Tensor.html#t:Ref">Ref</a></li></ul></li><liclass="src short"><ahref="#v:tensorKind">tensorKind</a> :: Lens' (<ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a) (<ahref="TensorFlow-Tensor.html#t:TensorKind">TensorKind</a> v)</li><liclass="src short"><ahref="#v:tensorOutput">tensorOutput</a> :: Lens' (<ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a) <ahref="TensorFlow-Output.html#t:Output">Output</a></li><liclass="src short"><ahref="#v:tensorAttr">tensorAttr</a> :: <ahref="TensorFlow-Types.html#t:Attribute">Attribute</a> attr => Text -> Traversal' (<ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a) attr</li><liclass="src short"><ahref="#v:value">value</a> :: <ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a -><ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a><ahref="TensorFlow-Tensor.html#t:Value">Value</a> a</li><liclass="src short"><spanclass="keyword">data</span><ahref="#t:Feed">Feed</a> = <ahref="#v:Feed">Feed</a><ahref="TensorFlow-Output.html#t:Output">Output</a><ahref="TensorFlow-Internal-FFI.html#t:TensorData">TensorData</a></li><liclass="src short"><ahref="#v:feed">feed</a> :: <ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a -><ahref="TensorFlow-Types.html#t:TensorData">TensorData</a> a -><ahref="TensorFlow-Tensor.html#t:Feed">Feed</a></li><liclass="src short"><ahref="#v:tensorFromName">tensorFromName</a> :: <ahref="TensorFlow-Tensor.html#t:TensorKind">TensorKind</a> v -> Text -><ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a</li></ul></div><divid="interface"><h1>Documentation</h1><divclass="top"><pclass="src"><spanclass="keyword">data</span><aname="t:Tensor"class="def">Tensor</a> v a</p><divclass="doc"><p>A named output of a TensorFlow operation.</p><p>The type parameter <code>a</code> is the type of the elements in the <code><ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a></code>. The
parameter <code>v</code> is either <code><ahref="TensorFlow-Tensor.html#t:Value">Value</a></code> or <code><ahref="TensorFlow-Tensor.html#t:Ref">Ref</a></code>, depending on whether the graph is
treating this op output as an immutable <code><ahref="TensorFlow-Tensor.html#t:Value">Value</a></code> or a stateful <code><ahref="TensorFlow-Tensor.html#t:Ref">Ref</a></code> (e.g., a
variable). Note that a <code>Tensor Ref</code> can be casted into a <code>Tensor Value</code> via
<code><ahref="TensorFlow-Tensor.html#v:value">value</a></code>.</p></div><divclass="subs constructors"><pclass="caption">Constructors</p><table><tr><tdclass="src"><aname="v:Tensor"class="def">Tensor</a> (<ahref="TensorFlow-Tensor.html#t:TensorKind">TensorKind</a> v) <ahref="TensorFlow-Output.html#t:Output">Output</a></td><tdclass="doc empty"> </td></tr></table></div><divclass="subs instances"><pid="control.i:Tensor"class="caption collapser"onclick="toggleSection('i:Tensor')">Instances</p><divid="section.i:Tensor"class="show"><table><tr><tdclass="src clearfix"><spanclass="inst-left"><ahref="TensorFlow-BuildOp.html#t:BuildOp">BuildOp</a> [<ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a><ahref="TensorFlow-Tensor.html#t:Value">Value</a> a]</span></td><tdclass="doc empty"> </td></tr><tr><tdclass="src clearfix"><spanclass="inst-left"><ahref="TensorFlow-BuildOp.html#t:BuildOp">BuildOp</a> f =><ahref="TensorFlow-BuildOp.html#t:BuildOp">BuildOp</a> ([<ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a] -> f)</span></td><tdclass="doc empty"> </td></tr><tr><tdclass="src clearfix"><spanclass="inst-left"><ahref="TensorFlow-BuildOp.html#t:BuildOp">BuildOp</a> f =><ahref="TensorFlow-BuildOp.html#t:BuildOp">BuildOp</a> (<ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a -> f)</span></td><tdclass="doc empty"> </td></tr><tr><tdclass="src clearfix"><spanclass="inst-left"><ahref="TensorFlow-BuildOp.html#t:BuildOp">BuildOp</a> (<ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a><ahref="TensorFlow-Tensor.html#t:Ref">Ref</a> a)</span></td><tdclass="doc empty"> </td></tr><tr><tdclass="src clearfix"><spanclass="inst-left"><ahref="TensorFlow-BuildOp.html#t:BuildOp">BuildOp</a> (<ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a><ahref="TensorFlow-Tensor.html#t:Value">Value</a> a)</span></td><tdclass="doc empty"> </td></tr><tr><tdclass="src clearfix"><spanclass="inst-left"><ahref="TensorFlow-BuildOp.html#t:OpResult">OpResult</a> (<ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a><ahref="TensorFlow-Tensor.html#t:Ref">Ref</a> a)</span></td><tdclass="doc empty"> </td></tr><tr><tdclass="src clearfix"><spanclass="inst-left"><ahref="TensorFlow-BuildOp.html#t:OpResult">OpResult</a> (<ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a><ahref="TensorFlow-Tensor.html#t:Value">Value</a> a)</span></td><tdclass="doc empty"> </td></tr><tr><tdclass="src clearfix"><spanclass="inst-left"><ahref="TensorFlow-Nodes.html#t:Nodes">Nodes</a> (<ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a)</span></td><tdclass="doc empty"> </td></tr><tr><tdclass="src clearfix"><spanclass="inst-left">(<ahref="TensorFlow-Types.html#t:TensorType">TensorType</a> a, (~) * a a') =><ahref="TensorFlow-Nodes.html#t:Fetchable">Fetchable</a> (<ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a) (<ahref="TensorFlow-Nodes.html#t:Scalar">Scalar</a> a')</span></td><tdclass="doc empty"> </td></tr><tr><tdclass="src clearfix"><spanclass="inst-left">(<ahref="TensorFlow-Types.html#t:TensorType">TensorType</a> a, (~) * a a') =><ahref="TensorFlow-Nodes.html#t:Fetchable">Fetchable</a> (<ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a) (Vector a')</span></td><tdclass="doc empty"> </td></tr></table></div></div></div><divclass="top"><pclass="src"><spanclass="keyword">data</span><aname="t:Value"class="def">Value</a></p><divclass="subs instances"><pid="control.i:Value"class="caption collapser"onclick="toggleSection('i:Value')">Instances</p><divid="section.i:Value"class="show"><table><tr><tdclass="src clearfix"><spanclass="inst-left"><ahref="TensorFlow-BuildOp.html#t:BuildOp">BuildOp</a> [<ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a><ahref="TensorFlow-Tensor.html#t:Value">Value</a> a]</span></td><tdclass="doc empty"> </td></tr><tr><tdclass="src clearfix"><spanclass="inst-left"><ahref="TensorFlow-BuildOp.html#t:BuildOp">BuildOp</a> (<ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a><ahref="Ten
treated as a <code><ahref="TensorFlow-Tensor.html#t:Value">Value</a></code> or as a <code><ahref="TensorFlow-Tensor.html#t:Ref">Ref</a></code>.</p></div><divclass="subs constructors"><pclass="caption">Constructors</p><table><tr><tdclass="src"><aname="v:ValueKind"class="def">ValueKind</a> :: <ahref="TensorFlow-Tensor.html#t:TensorKind">TensorKind</a><ahref="TensorFlow-Tensor.html#t:Value">Value</a></td><tdclass="doc empty"> </td></tr><tr><tdclass="src"><aname="v:RefKind"class="def">RefKind</a> :: <ahref="TensorFlow-Tensor.html#t:TensorKind">TensorKind</a><ahref="TensorFlow-Tensor.html#t:Ref">Ref</a></td><tdclass="doc empty"> </td></tr></table></div></div><divclass="top"><pclass="src"><aname="v:tensorKind"class="def">tensorKind</a> :: Lens' (<ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a) (<ahref="TensorFlow-Tensor.html#t:TensorKind">TensorKind</a> v)</p></div><divclass="top"><pclass="src"><aname="v:tensorOutput"class="def">tensorOutput</a> :: Lens' (<ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a) <ahref="TensorFlow-Output.html#t:Output">Output</a></p></div><divclass="top"><pclass="src"><aname="v:tensorAttr"class="def">tensorAttr</a> :: <ahref="TensorFlow-Types.html#t:Attribute">Attribute</a> attr => Text -> Traversal' (<ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a) attr</p><divclass="doc"><p>Lens for the attributes of a tensor.</p><p>Only valid if the tensor has not yet been rendered. If the tensor has been
written).</p></div></div><divclass="top"><pclass="src"><aname="v:value"class="def">value</a> :: <ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a -><ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a><ahref="TensorFlow-Tensor.html#t:Value">Value</a> a</p><divclass="doc"><p>Cast a 'Tensor *' into a 'Tensor Value'. Common usage is to cast a
Ref into Value. This behaves like a no-op.</p></div></div><divclass="top"><pclass="src"><spanclass="keyword">data</span><aname="t:Feed"class="def">Feed</a></p><divclass="doc"><p>A pair of a <code><ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a></code> and some data that should be fed into that <code><ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a></code>
when running the graph.</p></div><divclass="subs constructors"><pclass="caption">Constructors</p><table><tr><tdclass="src"><aname="v:Feed"class="def">Feed</a><ahref="TensorFlow-Output.html#t:Output">Output</a><ahref="TensorFlow-Internal-FFI.html#t:TensorData">TensorData</a></td><tdclass="doc empty"> </td></tr></table></div></div><divclass="top"><pclass="src"><aname="v:feed"class="def">feed</a> :: <ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a -><ahref="TensorFlow-Types.html#t:TensorData">TensorData</a> a -><ahref="TensorFlow-Tensor.html#t:Feed">Feed</a></p><divclass="doc"><p>Create a <code><ahref="TensorFlow-Tensor.html#t:Feed">Feed</a></code> for feeding the given data into a <code><ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a></code> when running
rendered <code><ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a></code> may be different than feeding the original <code><ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a></code>.</p></div></div><divclass="top"><pclass="src"><aname="v:tensorFromName"class="def">tensorFromName</a> :: <ahref="TensorFlow-Tensor.html#t:TensorKind">TensorKind</a> v -> Text -><ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a</p><divclass="doc"><p>Create a <code><ahref="TensorFlow-Tensor.html#t:Tensor">Tensor</a></code> for a given name. This can be used to reference nodes
in a <code>GraphDef</code> that was loaded via <code>addGraphDef</code>.
TODO(judahjacobson): add more safety checks here.</p></div></div></div></div><divid="footer"><p>Produced by <ahref="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>