class_docstr: xDeepFM model
  
  :Citation:
  
      J. Lian, X. Zhou, F. Zhang, Z. Chen, X. Xie, G. Sun, "xDeepFM: Combining Explicit
      and Implicit Feature Interactions for Recommender Systems", in Proceedings of the
      24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining,
      KDD 2018, London, 2018.
docstr: The field embedding layer. MLP requires fixed-length vectors as input.
  This function makes sum pooling of feature embeddings for each field.
  
  Returns:
      embedding:  The result of field embedding layer, with size of #_fields * #_dim.
      embedding_size: #_fields * #_dim
code: def _build_embedding(self):
      """The field embedding layer. MLP requires fixed-length vectors as input.
      This function makes sum pooling of feature embeddings for each field.
  
      Returns:
          embedding:  The result of field embedding layer, with size of #_fields * #_dim.
          embedding_size: #_fields * #_dim
      """
      hparams = self.hparams
      fm_sparse_index = tf.SparseTensor(
          self.iterator.dnn_feat_indices,
          self.iterator.dnn_feat_values,
          self.iterator.dnn_feat_shape,
      )
      fm_sparse_weight = tf.SparseTensor(
          self.iterator.dnn_feat_indices,
          self.iterator.dnn_feat_weights,
          self.iterator.dnn_feat_shape,
      )
      w_fm_nn_input_orgin = tf.nn.embedding_lookup_sparse(
          params=self.embedding,
          sp_ids=fm_sparse_index,
          sp_weights=fm_sparse_weight,
          combiner="sum",
      )
      embedding = tf.reshape(
          w_fm_nn_input_orgin, [-1, hparams.dim * hparams.FIELD_COUNT]
      )
      embedding_size = hparams.FIELD_COUNT * hparams.dim
      return embedding, embedding_size
  
file_path: recommenders/recommenders/models/deeprec/models/xDeepFM.py
imports: import numpy
  import tensorflow
  from recommenders.models.deeprec.models.base_model import BaseModel
label_desc: Use image node_id 2 for calling the XDeepFMModel obj's underlying member method code with example usage: obj._build_embedding() and returns: embedding,  embedding_size