import tensorflow as tf


        self._initializers = {
            "w": tf.contrib.layers.xavier_initializer(),
        }

        self._regularizers = {
            'w': tf.contrib.layers.l2_regularizer(config.l2)
        }

        self._construct_placeholders()
        self._construct_weights()
        self._construct()
        tf.summary.scalar('Model/Loss', tf.get_collection(GraphKeys.LOSSES)[0])
        self.summary = tf.summary.merge_all()

    def _construct(self):
        """
        Construct the model; main part of it goes here
        """

        self.v = DenseLayer(1, False, tf.nn.relu, initializers=self._initializers,
                                            regularizers=self._regularizers, name='OutputVector')
        self.score = tf.squeeze(self.v(self._cur_user * self._cur_item))
        negative_output = tf.squeeze(self.v(self._cur_user * self._cur_item_negative))
        tf.add_to_collection(GraphKeys.PREDICTION, self.score)
        self.loss = LossLayer()(self.score, negative_output)
