def METHOD_NAME(self):
    """The main function to create DKN's logic.
    Returns:
        object: Prediction of item2item relation scores made by the DKN model, in the shape of (`batch_size`, `num_negative` + 1).
    """
    news_field_embed_final_batch = self._build_doc_embedding(
        self.iterator.candidate_news_index_batch,
        self.iterator.candidate_news_entity_index_batch,
    )
    self.news_field_embed_final_batch = tf.math.l2_normalize(
        news_field_embed_final_batch, axis=-1, epsilon=1e-12
    )
    item_embs_train = tf.reshape(
        self.news_field_embed_final_batch,
        [
            -1,
            self.iterator.neg_num + 2,
            self.news_field_embed_final_batch.shape[-1],
        ],
    )  # (B, group, D)
    item_embs_source = item_embs_train[:, 0, :]  # get the source item
    item_embs_source = tf.expand_dims(item_embs_source, 1)
    item_embs_target = item_embs_train[:, 1:, :]
    item_relation = tf.math.multiply(item_embs_target, item_embs_source)
    item_relation = tf.reduce_sum(
        input_tensor=item_relation, axis=-1
    )  # (B, neg_num + 1)
    self.pred_logits = item_relation
    return self.pred_logits