code: def __init__(
      self,
      n_uid,
      n_mid,
      n_cat,
      EMBEDDING_DIM,
      HIDDEN_SIZE,
      ATTENTION_SIZE,
      lr,
      data_type="FP32",
      use_negsampling=False,
  ):
      super(Model_WideDeep, self).__init__(
          n_uid,
          n_mid,
          n_cat,
          EMBEDDING_DIM,
          HIDDEN_SIZE,
          ATTENTION_SIZE,
          lr,
          data_type,
          use_negsampling,
      )
  
      inp = tf.concat(
          [self.uid_batch_embedded, self.item_eb, self.item_his_eb_sum],
          1,
      )
      # Fully connected layer
      bn1 = tf.layers.batch_normalization(inputs=inp, name="bn1")
      dnn1 = tf.layers.dense(bn1, 200, activation=None, name="f1")
      dnn1 = prelu(dnn1, "p1")
      dnn2 = tf.layers.dense(dnn1, 80, activation=None, name="f2")
      dnn2 = prelu(dnn2, "p2")
      dnn3 = tf.layers.dense(dnn2, 2, activation=None, name="f3")
      d_layer_wide = tf.concat(
          [
              tf.concat([self.item_eb, self.item_his_eb_sum], axis=-1),
              self.item_eb * self.item_his_eb_sum,
          ],
          axis=-1,
      )
      d_layer_wide = tf.layers.dense(
          d_layer_wide, 2, activation=None, name="f_fm"
      )
      self.y_hat = tf.nn.softmax(dnn3 + d_layer_wide)
  
      with tf.name_scope("Metrics"):
          # Cross-entropy loss and optimizer initialization
          self.loss = -tf.reduce_mean(
              tf.log(self.y_hat) * self.target_ph
          )
          tf.summary.scalar("loss", self.loss)
          self.optim = tf.train.AdamOptimizer(learning_rate=self.lr)
          self.optimizer = self.optim.minimize(self.loss)
          # Accuracy metric
          self.accuracy = tf.reduce_mean(
              tf.cast(
                  tf.equal(tf.round(self.y_hat), self.target_ph),
                  self.model_dtype,
              )
          )
          tf.summary.scalar("accuracy", self.accuracy)
      self.merged = tf.summary.merge_all()
  
imports: import tensorflow
  from rnn import dynamic_rnn
  from utils import *
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 1 to create a new Model_WideDeep object from inherited base classes: Model with example: obj = Model_WideDeep(n_uid, n_mid, n_cat, EMBEDDING_DIM, HIDDEN_SIZE, ATTENTION_SIZE, lr, data_type, use_negsampling)