1
0
mirror of https://github.com/tensorflow/haskell.git synced 2024-06-29 07:58:33 +02:00
tensorflow-haskell/docs/haddock/tensorflow-0.1.0.0/TensorFlow-Types.html
2017-04-08 07:14:47 -07:00

12 lines
50 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.Types</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-Types.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.Types</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Lists</a></li><li><a href="#g:2">Type constraints</a><ul><li><a href="#g:3">Implementation of constraints</a></li></ul></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">class</span> <a href="#t:TensorType">TensorType</a> a <span class="keyword">where</span><ul class="subs"><li><a href="#v:tensorType">tensorType</a> :: a -&gt; <a href="TensorFlow-Types.html#t:DataType">DataType</a></li><li><a href="#v:tensorRefType">tensorRefType</a> :: a -&gt; <a href="TensorFlow-Types.html#t:DataType">DataType</a></li><li><a href="#v:tensorVal">tensorVal</a> :: Lens' <a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-Tensor.html#t:TensorProto">TensorProto</a> [a]</li></ul></li><li class="src short"><span class="keyword">newtype</span> <a href="#t:TensorData">TensorData</a> a = <a href="#v:TensorData">TensorData</a> {<ul class="subs"><li><a href="#v:unTensorData">unTensorData</a> :: <a href="TensorFlow-Internal-FFI.html#t:TensorData">TensorData</a></li></ul>}</li><li class="src short"><span class="keyword">class</span> <a href="TensorFlow-Types.html#t:TensorType">TensorType</a> a =&gt; <a href="#t:TensorDataType">TensorDataType</a> s a <span class="keyword">where</span><ul class="subs"><li><a href="#v:decodeTensorData">decodeTensorData</a> :: <a href="TensorFlow-Types.html#t:TensorData">TensorData</a> a -&gt; s a</li><li><a href="#v:encodeTensorData">encodeTensorData</a> :: <a href="TensorFlow-Types.html#t:Shape">Shape</a> -&gt; s a -&gt; <a href="TensorFlow-Types.html#t:TensorData">TensorData</a> a</li></ul></li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Scalar">Scalar</a> a = <a href="#v:Scalar">Scalar</a> {<ul class="subs"><li><a href="#v:unScalar">unScalar</a> :: a</li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:Shape">Shape</a> = <a href="#v:Shape">Shape</a> [<a href="../base-4.8.2.0/Data-Int.html#t:Int64">Int64</a>]</li><li class="src short"><a href="#v:protoShape">protoShape</a> :: Lens' <a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-TensorShape.html#t:TensorShapeProto">TensorShapeProto</a> <a href="TensorFlow-Types.html#t:Shape">Shape</a></li><li class="src short"><span class="keyword">class</span> <a href="#t:Attribute">Attribute</a> a <span class="keyword">where</span><ul class="subs"><li><a href="#v:attrLens">attrLens</a> :: Lens' <a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-AttrValue.html#t:AttrValue">AttrValue</a> a</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:DataType">DataType</a> :: *<ul class="subs"><li>= <a href="#v:DT_INVALID">DT_INVALID</a></li><li>| <a href="#v:DT_FLOAT">DT_FLOAT</a></li><li>| <a href="#v:DT_DOUBLE">DT_DOUBLE</a></li><li>| <a href="#v:DT_INT32">DT_INT32</a></li><li>| <a href="#v:DT_UINT8">DT_UINT8</a></li><li>| <a href="#v:DT_INT16">DT_INT16</a></li><li>| <a href="#v:DT_INT8">DT_INT8</a></li><li>| <a href="#v:DT_STRING">DT_STRING</a></li><li>| <a href="#v:DT_COMPLEX64">DT_COMPLEX64</a></li><li>| <a href="#v:DT_INT64">DT_INT64</a></li><li>| <a href="#v:DT_BOOL">DT_BOOL</a></li><li>| <a href="#v:DT_QINT8">DT_QINT8</a></li><li>| <a href="#v:DT_QUINT8">DT_QUINT8</a></li><li>| <a href="#v:DT_QINT32">DT_QINT32</a></li><li>| <a href="#v:DT_BFLOAT16">DT_BFLOAT16</a></li><li>| <a href="#v:DT_QINT16">DT_QINT16</a></li><li>| <a href="#v:DT_QUINT16">DT_QUINT16</a></li><li>| <a href="#v:DT_UINT16">DT_UINT16</a></li><li>| <a href="#v:DT_COMPLEX128">DT_COMPLEX128</a></li><li>| <a href="#v:DT_HALF">DT_HALF</a></li><li>| <a href="#v:DT_RESOURCE">DT_RESOURCE</a></li><li>| <a href="#v:DT_FLOAT_REF">DT_FLOAT_REF</a></li><li>| <a href="#v:DT_DOUBLE_REF">DT_DOUBLE_REF</a></li><li>| <a href="#v:DT_INT32_REF">DT_INT32_REF</a></li><li>| <a href="#v:DT_UINT8_REF">DT_UINT8_REF</a></li><li>| <a href="#v:DT_INT16_REF">DT_INT16_REF</a></li><li>| <a href="#v:DT_INT8_REF">DT_INT8_REF</a></li><li>| <a href="#v:DT_STRING_REF">DT_STRING_REF</a></li><li>| <a href="#v:DT_COMPLEX64_REF">DT_COMPLEX64_REF</a></li><li>| <a href="#v:DT_INT64_REF">DT_INT64_REF</a></li><li>| <a href="#v:DT_BOOL_REF">DT_BOOL_REF</a></li><li>| <a href="#v:DT_QINT8_REF">DT_QINT8_REF</a></li><li>| <a href="#v:DT_QUINT8_REF">DT_QUINT8_REF</a></li><li>| <a href="#v:DT_QINT32_REF">DT_QINT32_REF</a></li><li>| <a href="#v:DT_BFLOAT16_REF">DT_BFLOAT16_REF</a></li><li>| <a href="#v:DT_QINT16_REF">DT_QINT16_REF</a></li><li>| <a href="#v:DT_QUINT16_REF">DT_QUINT16_REF</a></li><li>| <a href="#v:DT_UINT16_REF">DT_UINT16_REF</a></li><li>| <a href="#v:DT_COMPLEX128_REF">DT_COMPLEX128_REF</a></li><li>| <a href="#v:DT_HALF_REF">DT_HALF_REF</a></li><li>| <a href="#v:DT_RESOURCE_REF">DT_RESOURCE_REF</a></li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:ListOf">ListOf</a> f as <span class="keyword">where</span><ul class="subs"><li><a href="#v:Nil">Nil</a> :: <a href="TensorFlow-Types.html#t:ListOf">ListOf</a> f `[]`</li><li><a href="#v::-47-">(:/)</a> :: f a -&gt; <a href="TensorFlow-Types.html#t:ListOf">ListOf</a> f as -&gt; <a href="TensorFlow-Types.html#t:ListOf">ListOf</a> f (a : as)</li></ul></li><li class="src short"><span class="keyword">type</span> <a href="#t:List">List</a> = <a href="TensorFlow-Types.html#t:ListOf">ListOf</a> <a href="../base-4.8.2.0/Data-Functor-Identity.html#t:Identity">Identity</a></li><li class="src short"><a href="#v:-47-:-47-">(/:/)</a> :: a -&gt; <a href="TensorFlow-Types.html#t:List">List</a> as -&gt; <a href="TensorFlow-Types.html#t:List">List</a> (a : as)</li><li class="src short"><span class="keyword">data</span> <a href="#t:TensorTypeProxy">TensorTypeProxy</a> a <span class="keyword">where</span><ul class="subs"><li><a href="#v:TensorTypeProxy">TensorTypeProxy</a> :: <a href="TensorFlow-Types.html#t:TensorType">TensorType</a> a =&gt; <a href="TensorFlow-Types.html#t:TensorTypeProxy">TensorTypeProxy</a> a</li></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:TensorTypes">TensorTypes</a> ts <span class="keyword">where</span><ul class="subs"><li><a href="#v:tensorTypes">tensorTypes</a> :: <a href="TensorFlow-Types.html#t:TensorTypeList">TensorTypeList</a> ts</li></ul></li><li class="src short"><span class="keyword">type</span> <a href="#t:TensorTypeList">TensorTypeList</a> = <a href="TensorFlow-Types.html#t:ListOf">ListOf</a> <a href="TensorFlow-Types.html#t:TensorTypeProxy">TensorTypeProxy</a></li><li class="src short"><a href="#v:fromTensorTypeList">fromTensorTypeList</a> :: <a href="TensorFlow-Types.html#t:TensorTypeList">TensorTypeList</a> ts -&gt; [<a href="TensorFlow-Types.html#t:DataType">DataType</a>]</li><li class="src short"><a href="#v:fromTensorTypes">fromTensorTypes</a> :: <span class="keyword">forall</span> as. <a href="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a> as =&gt; <a href="../base-4.8.2.0/Data-Proxy.html#t:Proxy">Proxy</a> as -&gt; [<a href="TensorFlow-Types.html#t:DataType">DataType</a>]</li><li class="src short"><span class="keyword">type</span> <a href="#t:OneOf">OneOf</a> ts a = (<a href="TensorFlow-Types.html#t:TensorType">TensorType</a> a, <a href="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a> ts, <a href="TensorFlow-Types.html#t:NoneOf">NoneOf</a> (<a href="TensorFlow-Types.html#t:AllTensorTypes">AllTensorTypes</a> <a href="TensorFlow-Types.html#t:-92--92-">\\</a> ts) a)</li><li class="src short"><span class="keyword">type family</span> a <a href="#t:-47--61-">/=</a> b :: <a href="../base-4.8.2.0/GHC-Exts.html#t:Constraint">Constraint</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:OneOfs">OneOfs</a> ts as = (<a href="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a> as, <a href="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a> ts, NoneOfs (<a href="TensorFlow-Types.html#t:AllTensorTypes">AllTensorTypes</a> <a href="TensorFlow-Types.html#t:-92--92-">\\</a> ts) as)</li><li class="src short"><span class="keyword">data</span> <a href="#t:TypeError">TypeError</a> a</li><li class="src short"><span class="keyword">data</span> <a href="#t:ExcludedCase">ExcludedCase</a></li><li class="src short"><span class="keyword">type family</span> <a href="#t:NoneOf">NoneOf</a> ts a :: <a href="../base-4.8.2.0/GHC-Exts.html#t:Constraint">Constraint</a></li><li class="src short"><span class="keyword">type family</span> as <a href="#t:-92--92-">\\</a> bs</li><li class="src short"><span class="keyword">type family</span> <a href="#t:Delete">Delete</a> a as</li><li class="src short"><span class="keyword">type</span> <a href="#t:AllTensorTypes">AllTensorTypes</a> = `[<a href="../base-4.8.2.0/Prelude.html#t:Float">Float</a>, <a href="../base-4.8.2.0/Prelude.html#t:Double">Double</a>, <a href="../base-4.8.2.0/Data-Int.html#t:Int8">Int8</a>, <a href="../base-4.8.2.0/Data-Int.html#t:Int16">Int16</a>, <a href="../base-4.8.2.0/Data-Int.html#t:Int32">Int32</a>, <a href="../base-4.8.2.0/Data-Int.html#t:Int64">Int64</a>, <a href="../base-4.8.2.0/Data-Word.html#t:Word8">Word8</a>, <a href="../base-4.8.2.0/Data-Word.html#t:Word16">Word16</a>, <a href="../bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a>, <a href="../base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>]`</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:TensorType" class="def">TensorType</a> a <span class="keyword">where</span></p><div class="doc"><p>The class of scalar types supported by tensorflow.</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:tensorType" class="def">tensorType</a> :: a -&gt; <a href="TensorFlow-Types.html#t:DataType">DataType</a></p><p class="src"><a name="v:tensorRefType" class="def">tensorRefType</a> :: a -&gt; <a href="TensorFlow-Types.html#t:DataType">DataType</a></p><p class="src"><a name="v:tensorVal" class="def">tensorVal</a> :: Lens' <a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-Tensor.html#t:TensorProto">TensorProto</a> [a]</p></div><div class="subs instances"><p id="control.i:TensorType" class="caption collapser" onclick="toggleSection('i:TensorType')">Instances</p><div id="section.i:TensorType" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorType">TensorType</a> <a href="../base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorType">TensorType</a> <a href="../base-4.8.2.0/Prelude.html#t:Double">Double</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorType">TensorType</a> <a href="../base-4.8.2.0/Prelude.html#t:Float">Float</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorType">TensorType</a> <a href="../base-4.8.2.0/Data-Int.html#t:Int8">Int8</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorType">TensorType</a> <a href="../base-4.8.2.0/Data-Int.html#t:Int16">Int16</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorType">TensorType</a> <a href="../base-4.8.2.0/Data-Int.html#t:Int32">Int32</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorType">TensorType</a> <a href="../base-4.8.2.0/Data-Int.html#t:Int64">Int64</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorType">TensorType</a> <a href="../base-4.8.2.0/Data-Word.html#t:Word8">Word8</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorType">TensorType</a> <a href="../base-4.8.2.0/Data-Word.html#t:Word16">Word16</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorType">TensorType</a> <a href="../bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorType">TensorType</a> (<a href="../base-4.8.2.0/Data-Complex.html#t:Complex">Complex</a> <a href="../base-4.8.2.0/Prelude.html#t:Double">Double</a>)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorType">TensorType</a> (<a href="../base-4.8.2.0/Data-Complex.html#t:Complex">Complex</a> <a href="../base-4.8.2.0/Prelude.html#t:Float">Float</a>)</span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:TensorData" class="def">TensorData</a> a</p><div class="doc"><p>Tensor data with the correct memory layout for tensorflow.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:TensorData" class="def">TensorData</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:unTensorData" class="def">unTensorData</a> :: <a href="TensorFlow-Internal-FFI.html#t:TensorData">TensorData</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:TensorData" class="caption collapser" onclick="toggleSection('i:TensorData')">Instances</p><div id="section.i:TensorData" class="show"><table><tr><td class="src clearfix"><span class="inst-left">(<a href="TensorFlow-Types.html#t:TensorType">TensorType</a> a, (~) * a a') =&gt; <a href="TensorFlow-Nodes.html#t:Fetchable">Fetchable</a> (<a href="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a) (<a href="TensorFlow-Types.html#t:TensorData">TensorData</a> a')</span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="TensorFlow-Types.html#t:TensorType">TensorType</a> a =&gt; <a name="t:TensorDataType" class="def">TensorDataType</a> s a <span class="keyword">where</span></p><div class="doc"><p>Types that can be converted to and from <code><a href="TensorFlow-Types.html#t:TensorData">TensorData</a></code>.</p><p><code>Vector</code> is the most efficient to encode/decode for most element types.</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:decodeTensorData" class="def">decodeTensorData</a> :: <a href="TensorFlow-Types.html#t:TensorData">TensorData</a> a -&gt; s a</p><div class="doc"><p>Decode the bytes of a <code><a href="TensorFlow-Types.html#t:TensorData">TensorData</a></code> into an <code><a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-AttrValue.html#v:s">s</a></code>.</p></div><p class="src"><a name="v:encodeTensorData" class="def">encodeTensorData</a> :: <a href="TensorFlow-Types.html#t:Shape">Shape</a> -&gt; s a -&gt; <a href="TensorFlow-Types.html#t:TensorData">TensorData</a> a</p><div class="doc"><p>Encode an <code><a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-AttrValue.html#v:s">s</a></code> into a <code><a href="TensorFlow-Types.html#t:TensorData">TensorData</a></code>.</p><p>The values should be in row major order, e.g.,</p><p>element 0: index (0, ..., 0)
element 1: index (0, ..., 1)
...</p></div></div><div class="subs instances"><p id="control.i:TensorDataType" class="caption collapser" onclick="toggleSection('i:TensorDataType')">Instances</p><div id="section.i:TensorDataType" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.8.2.0/Prelude.html#t:Double">Double</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.8.2.0/Prelude.html#t:Float">Float</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.8.2.0/Data-Int.html#t:Int8">Int8</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.8.2.0/Data-Int.html#t:Int16">Int16</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.8.2.0/Data-Int.html#t:Int32">Int32</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.8.2.0/Data-Int.html#t:Int64">Int64</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.8.2.0/Data-Word.html#t:Word8">Word8</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorDataType">TensorDataType</a> Vector <a href="../base-4.8.2.0/Data-Word.html#t:Word16">Word16</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="../base-4.8.2.0/Foreign-Storable.html#t:Storable">Storable</a> a, <a href="TensorFlow-Types.html#t:TensorDataType">TensorDataType</a> Vector a) =&gt; <a href="TensorFlow-Types.html#t:TensorDataType">TensorDataType</a> Vector a</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorDataType">TensorDataType</a> Vector <a href="../bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorDataType">TensorDataType</a> Vector a =&gt; <a href="TensorFlow-Types.html#t:TensorDataType">TensorDataType</a> <a href="TensorFlow-Types.html#t:Scalar">Scalar</a> a</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorDataType">TensorDataType</a> Vector (<a href="../base-4.8.2.0/Data-Complex.html#t:Complex">Complex</a> <a href="../base-4.8.2.0/Prelude.html#t:Double">Double</a>)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorDataType">TensorDataType</a> Vector (<a href="../base-4.8.2.0/Data-Complex.html#t:Complex">Complex</a> <a href="../base-4.8.2.0/Prelude.html#t:Float">Float</a>)</span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Scalar" class="def">Scalar</a> a</p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Scalar" class="def">Scalar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:unScalar" class="def">unScalar</a> :: a</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Scalar" class="caption collapser" onclick="toggleSection('i:Scalar')">Instances</p><div id="section.i:Scalar" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorDataType">TensorDataType</a> Vector a =&gt; <a href="TensorFlow-Types.html#t:TensorDataType">TensorDataType</a> <a href="TensorFlow-Types.html#t:Scalar">Scalar</a> a</span></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 =&gt; <a href="../base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> (<a href="TensorFlow-Types.html#t:Scalar">Scalar</a> a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Prelude.html#t:Floating">Floating</a> a =&gt; <a href="../base-4.8.2.0/Prelude.html#t:Floating">Floating</a> (<a href="TensorFlow-Types.html#t:Scalar">Scalar</a> a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Prelude.html#t:Fractional">Fractional</a> a =&gt; <a href="../base-4.8.2.0/Prelude.html#t:Fractional">Fractional</a> (<a href="TensorFlow-Types.html#t:Scalar">Scalar</a> a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="../base-4.8.2.0/Prelude.html#t:Num">Num</a> (<a href="TensorFlow-Types.html#t:Scalar">Scalar</a> a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="../base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> (<a href="TensorFlow-Types.html#t:Scalar">Scalar</a> a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Prelude.html#t:Real">Real</a> a =&gt; <a href="../base-4.8.2.0/Prelude.html#t:Real">Real</a> (<a href="TensorFlow-Types.html#t:Scalar">Scalar</a> a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Prelude.html#t:RealFloat">RealFloat</a> a =&gt; <a href="../base-4.8.2.0/Prelude.html#t:RealFloat">RealFloat</a> (<a href="TensorFlow-Types.html#t:Scalar">Scalar</a> a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Prelude.html#t:RealFrac">RealFrac</a> a =&gt; <a href="../base-4.8.2.0/Prelude.html#t:RealFrac">RealFrac</a> (<a href="TensorFlow-Types.html#t:Scalar">Scalar</a> a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Text-Show.html#t:Show">Show</a> a =&gt; <a href="../base-4.8.2.0/Text-Show.html#t:Show">Show</a> (<a href="TensorFlow-Types.html#t:Scalar">Scalar</a> a)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Data-String.html#t:IsString">IsString</a> a =&gt; <a href="../base-4.8.2.0/Data-String.html#t:IsString">IsString</a> (<a href="TensorFlow-Types.html#t:Scalar">Scalar</a> a)</span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Shape" class="def">Shape</a></p><div class="doc"><p>Shape (dimensions) of a tensor.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Shape" class="def">Shape</a> [<a href="../base-4.8.2.0/Data-Int.html#t:Int64">Int64</a>]</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Shape" class="caption collapser" onclick="toggleSection('i:Shape')">Instances</p><div id="section.i:Shape" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/GHC-Exts.html#t:IsList">IsList</a> <a href="TensorFlow-Types.html#t:Shape">Shape</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="TensorFlow-Types.html#t:Shape">Shape</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:Attribute">Attribute</a> <a href="TensorFlow-Types.html#t:Shape">Shape</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="keyword">type</span> <a href="../base-4.8.2.0/GHC-Exts.html#t:Item">Item</a> <a href="TensorFlow-Types.html#t:Shape">Shape</a> = <a href="../base-4.8.2.0/Data-Int.html#t:Int64">Int64</a></span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:protoShape" class="def">protoShape</a> :: Lens' <a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-TensorShape.html#t:TensorShapeProto">TensorShapeProto</a> <a href="TensorFlow-Types.html#t:Shape">Shape</a></p></div><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:Attribute" class="def">Attribute</a> a <span class="keyword">where</span></p><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:attrLens" class="def">attrLens</a> :: Lens' <a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-AttrValue.html#t:AttrValue">AttrValue</a> a</p></div><div class="subs instances"><p id="control.i:Attribute" class="caption collapser" onclick="toggleSection('i:Attribute')">Instances</p><div id="section.i:Attribute" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:Attribute">Attribute</a> <a href="../base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:Attribute">Attribute</a> <a href="../base-4.8.2.0/Prelude.html#t:Float">Float</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:Attribute">Attribute</a> <a href="../base-4.8.2.0/Data-Int.html#t:Int64">Int64</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:Attribute">Attribute</a> <a href="../bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:Attribute">Attribute</a> <a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-AttrValue.html#t:AttrValue-39-ListValue">AttrValue'ListValue</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:Attribute">Attribute</a> <a href="../tensorflow-proto-0.1.0.0/Proto-Tensorflow-Core-Framework-Tensor.html#t:TensorProto">TensorProto</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:Attribute">Attribute</a> <a href="TensorFlow-Types.html#t:DataType">DataType</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:Attribute">Attribute</a> <a href="TensorFlow-Types.html#t:Shape">Shape</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:Attribute">Attribute</a> [<a href="../base-4.8.2.0/Data-Int.html#t:Int64">Int64</a>]</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:Attribute">Attribute</a> [<a href="TensorFlow-Types.html#t:DataType">DataType</a>]</span></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:DataType" class="def">DataType</a> :: *</p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:DT_INVALID" class="def">DT_INVALID</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_FLOAT" class="def">DT_FLOAT</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_DOUBLE" class="def">DT_DOUBLE</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_INT32" class="def">DT_INT32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_UINT8" class="def">DT_UINT8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_INT16" class="def">DT_INT16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_INT8" class="def">DT_INT8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_STRING" class="def">DT_STRING</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_COMPLEX64" class="def">DT_COMPLEX64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_INT64" class="def">DT_INT64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_BOOL" class="def">DT_BOOL</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_QINT8" class="def">DT_QINT8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_QUINT8" class="def">DT_QUINT8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_QINT32" class="def">DT_QINT32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_BFLOAT16" class="def">DT_BFLOAT16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_QINT16" class="def">DT_QINT16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_QUINT16" class="def">DT_QUINT16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_UINT16" class="def">DT_UINT16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_COMPLEX128" class="def">DT_COMPLEX128</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_HALF" class="def">DT_HALF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_RESOURCE" class="def">DT_RESOURCE</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_FLOAT_REF" class="def">DT_FLOAT_REF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_DOUBLE_REF" class="def">DT_DOUBLE_REF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_INT32_REF" class="def">DT_INT32_REF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_UINT8_REF" class="def">DT_UINT8_REF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_INT16_REF" class="def">DT_INT16_REF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_INT8_REF" class="def">DT_INT8_REF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_STRING_REF" class="def">DT_STRING_REF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_COMPLEX64_REF" class="def">DT_COMPLEX64_REF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_INT64_REF" class="def">DT_INT64_REF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_BOOL_REF" class="def">DT_BOOL_REF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_QINT8_REF" class="def">DT_QINT8_REF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_QUINT8_REF" class="def">DT_QUINT8_REF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_QINT32_REF" class="def">DT_QINT32_REF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_BFLOAT16_REF" class="def">DT_BFLOAT16_REF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_QINT16_REF" class="def">DT_QINT16_REF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_QUINT16_REF" class="def">DT_QUINT16_REF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_UINT16_REF" class="def">DT_UINT16_REF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_COMPLEX128_REF" class="def">DT_COMPLEX128_REF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_HALF_REF" class="def">DT_HALF_REF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:DT_RESOURCE_REF" class="def">DT_RESOURCE_REF</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:DataType" class="caption collapser" onclick="toggleSection('i:DataType')">Instances</p><div id="section.i:DataType" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Prelude.html#t:Bounded">Bounded</a> <a href="TensorFlow-Types.html#t:DataType">DataType</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Prelude.html#t:Enum">Enum</a> <a href="TensorFlow-Types.html#t:DataType">DataType</a></span></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-Types.html#t:DataType">DataType</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="../base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="TensorFlow-Types.html#t:DataType">DataType</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">MessageEnum <a href="TensorFlow-Types.html#t:DataType">DataType</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">FieldDefault <a href="TensorFlow-Types.html#t:DataType">DataType</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">Default <a href="TensorFlow-Types.html#t:DataType">DataType</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:Attribute">Attribute</a> <a href="TensorFlow-Types.html#t:DataType">DataType</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:Attribute">Attribute</a> [<a href="TensorFlow-Types.html#t:DataType">DataType</a>]</span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:1">Lists</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ListOf" class="def">ListOf</a> f as <span class="keyword">where</span></p><div class="doc"><p>A heterogeneous list type.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Nil" class="def">Nil</a> :: <a href="TensorFlow-Types.html#t:ListOf">ListOf</a> f `[]`</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v::-47-" class="def">(:/)</a> :: f a -&gt; <a href="TensorFlow-Types.html#t:ListOf">ListOf</a> f as -&gt; <a href="TensorFlow-Types.html#t:ListOf">ListOf</a> f (a : as) <span class="fixity">infixr 5</span><span class="rightedge"></span></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:ListOf" class="caption collapser" onclick="toggleSection('i:ListOf')">Instances</p><div id="section.i:ListOf" class="show"><table><tr><td class="src clearfix"><span class="inst-left">All <a href="../base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> (Map f as) =&gt; <a href="../base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> (<a href="TensorFlow-Types.html#t:ListOf">ListOf</a> f as)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">All <a href="../base-4.8.2.0/Text-Show.html#t:Show">Show</a> (Map f as) =&gt; <a href="../base-4.8.2.0/Text-Show.html#t:Show">Show</a> (<a href="TensorFlow-Types.html#t:ListOf">ListOf</a> f as)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-BuildOp.html#t:BuildInputs">BuildInputs</a> (<a href="TensorFlow-Types.html#t:ListOf">ListOf</a> (<a href="TensorFlow-Tensor.html#t:Tensor">Tensor</a> v) as)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><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></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="TensorFlow-Tensor.html#t:Rendered">Rendered</a> v, <a href="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a> as) =&gt; <a href="TensorFlow-BuildOp.html#t:BuildResult">BuildResult</a> (<a href="TensorFlow-Tensor.html#t:TensorList">TensorList</a> v as)</span></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> (f a), <a href="TensorFlow-Nodes.html#t:Nodes">Nodes</a> (<a href="TensorFlow-Types.html#t:ListOf">ListOf</a> f as)) =&gt; <a href="TensorFlow-Nodes.html#t:Nodes">Nodes</a> (<a href="TensorFlow-Types.html#t:ListOf">ListOf</a> f ((:) * a as))</span></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-Types.html#t:ListOf">ListOf</a> f ([] *))</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(~) * l (<a href="TensorFlow-Types.html#t:List">List</a> ([] *)) =&gt; <a href="TensorFlow-Nodes.html#t:Fetchable">Fetchable</a> (<a href="TensorFlow-Types.html#t:ListOf">ListOf</a> f ([] *)) l</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="TensorFlow-Nodes.html#t:Fetchable">Fetchable</a> (f t) a, <a href="TensorFlow-Nodes.html#t:Fetchable">Fetchable</a> (<a href="TensorFlow-Types.html#t:ListOf">ListOf</a> f ts) (<a href="TensorFlow-Types.html#t:List">List</a> as), (~) (* -&gt; *) i <a href="../base-4.8.2.0/Data-Functor-Identity.html#t:Identity">Identity</a>) =&gt; <a href="TensorFlow-Nodes.html#t:Fetchable">Fetchable</a> (<a href="TensorFlow-Types.html#t:ListOf">ListOf</a> f ((:) * t ts)) (<a href="TensorFlow-Types.html#t:ListOf">ListOf</a> i ((:) * a as))</span></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:List" class="def">List</a> = <a href="TensorFlow-Types.html#t:ListOf">ListOf</a> <a href="../base-4.8.2.0/Data-Functor-Identity.html#t:Identity">Identity</a></p></div><div class="top"><p class="src"><a name="v:-47-:-47-" class="def">(/:/)</a> :: a -&gt; <a href="TensorFlow-Types.html#t:List">List</a> as -&gt; <a href="TensorFlow-Types.html#t:List">List</a> (a : as) <span class="fixity">infixr 5</span><span class="rightedge"></span></p><div class="doc"><p>Equivalent of <code><a href="TensorFlow-Types.html#v::-47-">:/</a></code> for lists.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:TensorTypeProxy" class="def">TensorTypeProxy</a> a <span class="keyword">where</span></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:TensorTypeProxy" class="def">TensorTypeProxy</a> :: <a href="TensorFlow-Types.html#t:TensorType">TensorType</a> a =&gt; <a href="TensorFlow-Types.html#t:TensorTypeProxy">TensorTypeProxy</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:TensorTypes" class="def">TensorTypes</a> ts <span class="keyword">where</span></p><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:tensorTypes" class="def">tensorTypes</a> :: <a href="TensorFlow-Types.html#t:TensorTypeList">TensorTypeList</a> ts</p></div><div class="subs instances"><p id="control.i:TensorTypes" class="caption collapser" onclick="toggleSection('i:TensorTypes')">Instances</p><div id="section.i:TensorTypes" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a> ([] *)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="TensorFlow-Types.html#t:TensorType">TensorType</a> t, <a href="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a> ts) =&gt; <a href="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a> ((:) * t ts)</span></td><td class="doc"><p>A constraint that the input is a list of <code><a href="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a></code>.</p></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:TensorTypeList" class="def">TensorTypeList</a> = <a href="TensorFlow-Types.html#t:ListOf">ListOf</a> <a href="TensorFlow-Types.html#t:TensorTypeProxy">TensorTypeProxy</a></p></div><div class="top"><p class="src"><a name="v:fromTensorTypeList" class="def">fromTensorTypeList</a> :: <a href="TensorFlow-Types.html#t:TensorTypeList">TensorTypeList</a> ts -&gt; [<a href="TensorFlow-Types.html#t:DataType">DataType</a>]</p></div><div class="top"><p class="src"><a name="v:fromTensorTypes" class="def">fromTensorTypes</a> :: <span class="keyword">forall</span> as. <a href="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a> as =&gt; <a href="../base-4.8.2.0/Data-Proxy.html#t:Proxy">Proxy</a> as -&gt; [<a href="TensorFlow-Types.html#t:DataType">DataType</a>]</p></div><h1 id="g:2">Type constraints</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:OneOf" class="def">OneOf</a> ts a = (<a href="TensorFlow-Types.html#t:TensorType">TensorType</a> a, <a href="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a> ts, <a href="TensorFlow-Types.html#t:NoneOf">NoneOf</a> (<a href="TensorFlow-Types.html#t:AllTensorTypes">AllTensorTypes</a> <a href="TensorFlow-Types.html#t:-92--92-">\\</a> ts) a)</p><div class="doc"><p>A <code><a href="../base-4.8.2.0/GHC-Exts.html#t:Constraint">Constraint</a></code> specifying the possible choices of a <code><a href="TensorFlow-Types.html#t:TensorType">TensorType</a></code>.</p><p>We implement a <code><a href="../base-4.8.2.0/GHC-Exts.html#t:Constraint">Constraint</a></code> like <code>OneOf '[Double, Float] a</code> by turning the
natural representation as a conjunction, i.e.,</p><pre> a == Double || a == Float
</pre><p>into a disjunction like</p><pre> a /= Int32 &amp;&amp; a /= Int64 &amp;&amp; a /= ByteString &amp;&amp; ...
</pre><p>using an enumeration of all the possible <code><a href="TensorFlow-Types.html#t:TensorType">TensorType</a></code>s.</p></div></div><div class="top"><p class="src"><span class="keyword">type family</span> a <a name="t:-47--61-" class="def">/=</a> b :: <a href="../base-4.8.2.0/GHC-Exts.html#t:Constraint">Constraint</a></p><div class="doc"><p>A constraint checking that two types are different.</p></div><div class="subs equations"><p class="caption">Equations</p><table><tr><td class="src">a <a href="TensorFlow-Types.html#t:-47--61-">/=</a> a = <a href="TensorFlow-Types.html#t:TypeError">TypeError</a> a ~ <a href="TensorFlow-Types.html#t:ExcludedCase">ExcludedCase</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">a <a href="TensorFlow-Types.html#t:-47--61-">/=</a> b = ()</td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:OneOfs" class="def">OneOfs</a> ts as = (<a href="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a> as, <a href="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a> ts, NoneOfs (<a href="TensorFlow-Types.html#t:AllTensorTypes">AllTensorTypes</a> <a href="TensorFlow-Types.html#t:-92--92-">\\</a> ts) as)</p></div><h2 id="g:3">Implementation of constraints</h2><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:TypeError" class="def">TypeError</a> a</p><div class="doc"><p>Helper types to produce a reasonable type error message when the Constraint
&quot;a /= a&quot; fails.
TODO(judahjacobson): Use ghc-8's CustomTypeErrors for this.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ExcludedCase" class="def">ExcludedCase</a></p></div><div class="top"><p class="src"><span class="keyword">type family</span> <a name="t:NoneOf" class="def">NoneOf</a> ts a :: <a href="../base-4.8.2.0/GHC-Exts.html#t:Constraint">Constraint</a></p><div class="doc"><p>A constraint that the type <code>a</code> doesn't appear in the type list <code>ts</code>.
Assumes that <code>a</code> and each of the elements of <code>ts</code> are <code><a href="TensorFlow-Types.html#t:TensorType">TensorType</a></code>s.</p></div><div class="subs equations"><p class="caption">Equations</p><table><tr><td class="src"><a href="TensorFlow-Types.html#t:NoneOf">NoneOf</a> (t1 : (t2 : (t3 : (t4 : ts)))) a = (a <a href="TensorFlow-Types.html#t:-47--61-">/=</a> t1, a <a href="TensorFlow-Types.html#t:-47--61-">/=</a> t2, a <a href="TensorFlow-Types.html#t:-47--61-">/=</a> t3, a <a href="TensorFlow-Types.html#t:-47--61-">/=</a> t4, <a href="TensorFlow-Types.html#t:NoneOf">NoneOf</a> ts a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="TensorFlow-Types.html#t:NoneOf">NoneOf</a> (t1 : (t2 : (t3 : ts))) a = (a <a href="TensorFlow-Types.html#t:-47--61-">/=</a> t1, a <a href="TensorFlow-Types.html#t:-47--61-">/=</a> t2, a <a href="TensorFlow-Types.html#t:-47--61-">/=</a> t3, <a href="TensorFlow-Types.html#t:NoneOf">NoneOf</a> ts a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="TensorFlow-Types.html#t:NoneOf">NoneOf</a> (t1 : (t2 : ts)) a = (a <a href="TensorFlow-Types.html#t:-47--61-">/=</a> t1, a <a href="TensorFlow-Types.html#t:-47--61-">/=</a> t2, <a href="TensorFlow-Types.html#t:NoneOf">NoneOf</a> ts a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="TensorFlow-Types.html#t:NoneOf">NoneOf</a> (t1 : ts) a = (a <a href="TensorFlow-Types.html#t:-47--61-">/=</a> t1, <a href="TensorFlow-Types.html#t:NoneOf">NoneOf</a> ts a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="TensorFlow-Types.html#t:NoneOf">NoneOf</a> `[]` a = ()</td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">type family</span> as <a name="t:-92--92-" class="def">\\</a> bs</p><div class="doc"><p>Takes the difference of two lists of types.</p></div><div class="subs equations"><p class="caption">Equations</p><table><tr><td class="src">as <a href="TensorFlow-Types.html#t:-92--92-">\\</a> `[]` = as</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">as <a href="TensorFlow-Types.html#t:-92--92-">\\</a> (b : bs) = <a href="TensorFlow-Types.html#t:Delete">Delete</a> b as <a href="TensorFlow-Types.html#t:-92--92-">\\</a> bs</td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">type family</span> <a name="t:Delete" class="def">Delete</a> a as</p><div class="doc"><p>Removes a type from the given list of types.</p></div><div class="subs equations"><p class="caption">Equations</p><table><tr><td class="src"><a href="TensorFlow-Types.html#t:Delete">Delete</a> a `[]` = `[]`</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="TensorFlow-Types.html#t:Delete">Delete</a> a (a : as) = <a href="TensorFlow-Types.html#t:Delete">Delete</a> a as</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="TensorFlow-Types.html#t:Delete">Delete</a> a (b : as) = b : <a href="TensorFlow-Types.html#t:Delete">Delete</a> a as</td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:AllTensorTypes" class="def">AllTensorTypes</a> = `[<a href="../base-4.8.2.0/Prelude.html#t:Float">Float</a>, <a href="../base-4.8.2.0/Prelude.html#t:Double">Double</a>, <a href="../base-4.8.2.0/Data-Int.html#t:Int8">Int8</a>, <a href="../base-4.8.2.0/Data-Int.html#t:Int16">Int16</a>, <a href="../base-4.8.2.0/Data-Int.html#t:Int32">Int32</a>, <a href="../base-4.8.2.0/Data-Int.html#t:Int64">Int64</a>, <a href="../base-4.8.2.0/Data-Word.html#t:Word8">Word8</a>, <a href="../base-4.8.2.0/Data-Word.html#t:Word16">Word16</a>, <a href="../bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a>, <a href="../base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>]`</p><div class="doc"><p>An enumeration of all valid <code><a href="TensorFlow-Types.html#t:TensorType">TensorType</a></code>s.</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>