From 92bb31a629ffa2c11836db268cdb81e5fc311200 Mon Sep 17 00:00:00 2001 From: facebook-github-bot Date: Tue, 19 Nov 2024 23:52:21 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=209cc85?= =?UTF-8?q?d9301ee6251f97dd38f47c90f3e6ec4f8fc=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules-api-reference.html | 49 +++++++++++++++++++++++--------------- searchindex.js | 2 +- 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/modules-api-reference.html b/modules-api-reference.html index 92c13e737..3ac048cb0 100644 --- a/modules-api-reference.html +++ b/modules-api-reference.html @@ -456,19 +456,24 @@

Modules -
  • F: features (keys)

  • -
  • B: batch size

  • -
  • L: length of sparse features (jagged)

  • +
  • F: number of features (keys)

  • +
  • B: batch size

  • +
  • L_{f,i}: length of sparse features (potentially distinct for each feature f and batch index i, that is, jagged)

  • -

    and outputs a KeyedTensor with values of the form [B * (F * D)] where:

    +

    and outputs a KeyedTensor with values with shape (B, D) where:

      -
    • F: features (keys)

    • -
    • D: each feature’s (key’s) embedding dimension

    • -
    • B: batch size

    • +
    • B: batch size

    • +
    • D: sum of embedding dimensions of all embedding tables, that is, sum([config.embedding_dim for config in tables])

    +

    Assuming the argument is a KeyedJaggedTensor J with F features, batch size B and L_{f,i} sparse lengths +such that J[f][i] is the bag for feature f and batch index i, the output KeyedTensor KT is defined as follows: +KT[i] = torch.cat([emb[f](J[f][i]) for f in J.keys()]) where emb[f] is the EmbeddingBag corresponding to the feature f.

    +

    Note that J[f][i] is a variable-length list of integer values (a bag), and emb[f](J[f][i]) is pooled embedding +produced by reducing the embeddings of each of the values in J[f][i] +using the EmbeddingBag emb[f]’s mode (default is the mean).

    Parameters: