merlin.models.tf.DLRMBlock

merlin.models.tf.DLRMBlock(schema: merlin.schema.schema.Schema, embedding_dim: int, bottom_block: Optional[merlin.models.tf.blocks.core.base.Block] = None, top_block: Optional[merlin.models.tf.blocks.core.base.Block] = None)merlin.models.tf.blocks.core.combinators.SequentialBlock[source]

Builds the DLRM architecture, as proposed in the following `paper https://arxiv.org/pdf/1906.00091.pdf`_ 1.

References

1

Naumov, Maxim, et al. “Deep learning recommendation model for personalization and recommendation systems.” arXiv preprint arXiv:1906.00091 (2019).

Parameters
  • schema (Schema) – The Schema with the input features

  • bottom_block (Block) – The Block that combines the continuous features (typically a MLPBlock)

  • top_block (Optional[Block], optional) – The optional Block that combines the outputs of bottom layer and of the factorization machine layer, by default None

  • embedding_dim (Optional[int], optional) – Dimension of the embeddings, by default None

Returns

The DLRM block

Return type

SequentialBlock

Raises
  • ValueError – The schema is required by DLRM

  • ValueError – The bottom_block is required by DLRM

  • ValueError – The embedding_dim (X) needs to match the last layer of bottom MLP (Y).