mirror of
https://github.com/tensorflow/haskell.git
synced 2024-11-05 10:39:44 +01:00
ea8b62e47b
* Trivial script for regenerating haddocks: exclude .haddock files. * Haddock regen
16 lines
No EOL
5 KiB
HTML
16 lines
No EOL
5 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.EmbeddingOps</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-EmbeddingOps.html");};
|
|
//]]>
|
|
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/TensorFlow-EmbeddingOps.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-ops-0.1.0.0: Friendly layer around 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.EmbeddingOps</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Parallel lookups on the list of tensors.</p></div></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"><a href="#v:embeddingLookup">embeddingLookup</a> :: <span class="keyword">forall</span> a b v. (<a href="../tensorflow-0.1.0.0/TensorFlow-Types.html#t:TensorType">TensorType</a> a, <a href="../tensorflow-0.1.0.0/TensorFlow-Types.html#t:OneOf">OneOf</a> `[<a href="../base-4.8.2.0/Data-Int.html#t:Int64">Int64</a>, <a href="../base-4.8.2.0/Data-Int.html#t:Int32">Int32</a>]` b, <a href="../base-4.8.2.0/Prelude.html#t:Num">Num</a> b) => [<a href="../tensorflow-0.1.0.0/TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a] -> <a href="../tensorflow-0.1.0.0/TensorFlow-Tensor.html#t:Tensor">Tensor</a> <a href="../tensorflow-0.1.0.0/TensorFlow-Tensor.html#t:Value">Value</a> b -> <a href="../tensorflow-0.1.0.0/TensorFlow-Build.html#t:Build">Build</a> (<a href="../tensorflow-0.1.0.0/TensorFlow-Tensor.html#t:Tensor">Tensor</a> <a href="../tensorflow-0.1.0.0/TensorFlow-Tensor.html#t:Value">Value</a> a)</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:embeddingLookup" class="def">embeddingLookup</a> <a href="src/TensorFlow-EmbeddingOps.html#embeddingLookup" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="../tensorflow-0.1.0.0/TensorFlow-Types.html#t:TensorType">TensorType</a> a, <a href="../tensorflow-0.1.0.0/TensorFlow-Types.html#t:OneOf">OneOf</a> `[<a href="../base-4.8.2.0/Data-Int.html#t:Int64">Int64</a>, <a href="../base-4.8.2.0/Data-Int.html#t:Int32">Int32</a>]` b, <a href="../base-4.8.2.0/Prelude.html#t:Num">Num</a> b)</td><td class="doc empty"> </td></tr><tr><td class="src">=> [<a href="../tensorflow-0.1.0.0/TensorFlow-Tensor.html#t:Tensor">Tensor</a> v a]</td><td class="doc"><p>A list of tensors which can be concatenated along
|
|
dimension 0. Each <code><a href="../tensorflow-0.1.0.0/TensorFlow-Tensor.html#t:Tensor">Tensor</a></code> must be appropriately
|
|
sized for <code><a href="../base-4.8.2.0/Prelude.html#v:mod">mod</a></code> partition strategy.</p></td></tr><tr><td class="src">-> <a href="../tensorflow-0.1.0.0/TensorFlow-Tensor.html#t:Tensor">Tensor</a> <a href="../tensorflow-0.1.0.0/TensorFlow-Tensor.html#t:Value">Value</a> b</td><td class="doc"><p>A <code><a href="../tensorflow-0.1.0.0/TensorFlow-Tensor.html#t:Tensor">Tensor</a></code> with type <code>int32</code> or <code>int64</code>
|
|
containing the ids to be looked up in <code>params</code>.
|
|
The ids are required to be flat on entry and have
|
|
fewer than 2^31 entries.</p></td></tr><tr><td class="src">-> <a href="../tensorflow-0.1.0.0/TensorFlow-Build.html#t:Build">Build</a> (<a href="../tensorflow-0.1.0.0/TensorFlow-Tensor.html#t:Tensor">Tensor</a> <a href="../tensorflow-0.1.0.0/TensorFlow-Tensor.html#t:Value">Value</a> a)</td><td class="doc"><p>A dense tensor with shape `shape(ids) + shape(params)[1:]`.</p></td></tr></table></div><div class="doc"><p>Looks up <code>ids</code> in a list of embedding tensors.</p><p>This function is used to perform parallel lookups on the list of
|
|
tensors in <code>params</code>. It is a generalization of <code><a href="TF.html#v:gather">gather</a></code>, where
|
|
<code>params</code> is interpreted as a partition of a larger embedding
|
|
tensor.</p><p>The partition_strategy is "mod", we assign each id to partition
|
|
`p = id % len(params)`. For instance,
|
|
13 ids are split across 5 partitions as:
|
|
`[[0, 5, 10], [1, 6, 11], [2, 7, 12], [3, 8], [4, 9]]`</p><p>The results of the lookup are concatenated into a dense
|
|
tensor. The returned tensor has shape `shape(ids) + shape(params)[1:]`.</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> |