import tensorflow as tf

        self.letor_features = tf.placeholder(tf.float32, shape=[None, self.feature_size], 
                                name="letor_features") # the letor features for the documents
        self.labels = []  # the labels for the documents (e.g., clicks)
        self.types=[]
        for i in range(self.max_candidate_num):
            self.docid_inputs.append(tf.placeholder(tf.int64, shape=[None],
                                            name="docid_input{0}".format(i)))
            self.labels.append(tf.placeholder(tf.float32, shape=[None],
                                            name="label{0}".format(i)))
            self.types.append(tf.placeholder(tf.float32, shape=[None],
                                            name="type{0}".format(i)))
        self.global_step = tf.Variable(0, trainable=False)

        # Select logits to prob function
        self.logits_to_prob = tf.nn.softmax
        if self.hparams.logits_to_prob == 'sigmoid':
            self.logits_to_prob = sigmoid_prob

        self.output = self.ranking_model(self.max_candidate_num, scope='ranking_model')
        pad_removed_output = self.remove_padding_for_metric_eval(self.docid_inputs, self.output)
        reshaped_labels = tf.transpose(tf.convert_to_tensor(self.labels)) # reshape from [max_candidate_num, ?] to [?, max_candidate_num]
        
