import tensorflow as tf

            reshaped_train_labels = tf.transpose(tf.convert_to_tensor(train_labels)) # reshape from [rank_list_size, ?] to [?, rank_list_size]
            self.propensity_weights = self.get_normalized_weights(self.logits_to_prob(self.propensity))
            self.rank_loss = self.loss_func(train_output, reshaped_train_labels, self.propensity_weights)
            pw_list = tf.unstack(self.propensity_weights, axis=1) # Compute propensity weights
            self.click_metrics=self.click_loglikelihood(reshaped_train_labels,\
                                                     self.propensity,train_output)
            tf.summary.scalar('click_metrics',self.click_metrics,collections=['train'])
            for i in range(len(pw_list)):
                tf.summary.scalar('Inverse Propensity weights %d' % i, tf.reduce_mean(pw_list[i]), collections=['train'])
            tf.summary.scalar('Rank Loss', tf.reduce_mean(self.rank_loss), collections=['train'])

            # Compute examination loss
