code: def __init__(self, embed_size, user_size, item_size):
      self.user = tf.placeholder(dtype=tf.int32, shape=(None,))
      self.item = tf.placeholder(dtype=tf.int32, shape=(None,))
      self.label = tf.placeholder(dtype=tf.int32, shape=(None,))
      # GMF part starts
      with tf.name_scope("GMF"):
          user_embed_GMF = tf.contrib.layers.embed_sequence(
              self.user, vocab_size=user_size + 1, embed_dim=embed_size
          )
          item_embed_GMF = tf.contrib.layers.embed_sequence(
              self.item, vocab_size=item_size + 1, embed_dim=embed_size
          )
          GMF = tf.multiply(user_embed_GMF, item_embed_GMF)
      # MLP part starts
      with tf.name_scope("MLP"):
          user_embed_MLP = tf.contrib.layers.embed_sequence(
              self.user, vocab_size=user_size + 1, embed_dim=embed_size
          )
          item_embed_MLP = tf.contrib.layers.embed_sequence(
              self.item, vocab_size=item_size + 1, embed_dim=embed_size
          )
          interaction = tf.concat(
              [user_embed_MLP, item_embed_MLP], axis=-1
          )
          layer1_MLP = tf.layers.dense(
              inputs=interaction, units=embed_size * 2
          )
          layer1_MLP = tf.layers.dropout(layer1_MLP, rate=0.2)
          layer2_MLP = tf.layers.dense(
              inputs=layer1_MLP, units=embed_size
          )
          layer2_MLP = tf.layers.dropout(layer2_MLP, rate=0.2)
          layer3_MLP = tf.layers.dense(
              inputs=layer2_MLP, units=embed_size // 2
          )
          layer3_MLP = tf.layers.dropout(layer3_MLP, rate=0.2)
      # Concate the two parts together
      with tf.name_scope("concatenation"):
          concatenation = tf.concat([GMF, layer3_MLP], axis=-1)
          self.logits = tf.layers.dense(inputs=concatenation, units=5)
          self.logits_softmax = tf.nn.softmax(self.logits)
          self.class_number = tf.argmax(self.logits_softmax, 1)
      with tf.name_scope("loss"):
          self.loss = tf.reduce_mean(
              tf.nn.sparse_softmax_cross_entropy_with_logits(
                  labels=self.label, logits=self.logits, name="loss"
              )
          )
      with tf.name_scope("optimzation"):
          self.optim = tf.train.AdamOptimizer(1e-3, name="Adam")
          self.optimizer = self.optim.minimize(self.loss)
  
file_path: BigDL/ppml/trusted-bigdata/examples/ncf_dataframe.py
imports: import os
  import zipfile
  import argparse
  import numpy
  import tensorflow
  from bigdl.dllib.feature.dataset import base
  from sklearn.model_selection import train_test_split
  from bigdl.orca import init_orca_context, stop_orca_context
  from bigdl.orca import OrcaContext
  from bigdl.orca.learn.tf.estimator import Estimator
  from bigdl.orca.data import SharedValue
  import bigdl.orca.data.pandas
  import argparse
label_desc: Use image node_id 1 to create a new NCF object from inherited base classes: object with example: obj = NCF(embed_size, user_size, item_size)