code: def __init__(self, loss):
      super().__init__()
      embedding_dimension = 32
  
      # Compute embeddings for users.
      self.user_embeddings = tf.keras.Sequential(
          [
              tf.keras.layers.StringLookup(vocabulary=unique_user_ids),
              tf.keras.layers.Embedding(
                  len(unique_user_ids) + 2, embedding_dimension
              ),
          ]
      )
  
      # Compute embeddings for movies.
      self.movie_embeddings = tf.keras.Sequential(
          [
              tf.keras.layers.StringLookup(
                  vocabulary=unique_movie_titles
              ),
              tf.keras.layers.Embedding(
                  len(unique_movie_titles) + 2, embedding_dimension
              ),
          ]
      )
  
      # Compute predictions.
      self.score_model = tf.keras.Sequential(
          [
              # Learn multiple dense layers.
              tf.keras.layers.Dense(256, activation="relu"),
              tf.keras.layers.Dense(64, activation="relu"),
              # Make rating predictions in the final layer.
              tf.keras.layers.Dense(1),
          ]
      )
  
      self.task = tfrs.tasks.Ranking(
          loss=loss,
          metrics=[
              tfr.keras.metrics.NDCGMetric(
                  name="ndcg_metric", ragged=True
              ),
              tf.keras.metrics.RootMeanSquaredError(),
          ],
      )
  
file_path: BigDL/python/friesian/example/listwise_ranking/listwise_pad.py
imports: import os
  import sys
  import math
  from optparse import OptionParser
  import tensorflow
  import tensorflow_ranking
  import tensorflow_recommenders
  from bigdl.orca import init_orca_context, stop_orca_context
  from bigdl.friesian.feature import FeatureTable
  from bigdl.orca.learn.tf2 import Estimator
  from bigdl.orca.data.tf.data import Dataset
  from bigdl.dllib.utils.log4Error import invalidInputError
label_desc: Use image node_id 1 to create a new RankingModel object from inherited base classes: tfrs with example: obj = RankingModel(loss)