import tensorflow as tf

    confidence_mat = tf.get_variable('confidence_mat', [in_size, 1])
    confidence_scores = tf.concat(1, [tf.matmul(o_, confidence_mat)
                                      for o_ in self._inputs])

    # dropout on confidence_scores
    random_tensor = (1.0 - self._dropout_keep_prob +
                     tf.random_uniform(tf.shape(confidence_scores)))
    binary_tensor = -50.0 * tf.floor(random_tensor)

    csshape = confidence_scores.get_shape()
    self.cs = tf.nn.softmax(tf.constant(1.0, shape=csshape))

    # The final prediction is the average of the predictions for each word
    # weighted by the individual confidence/utility scores.

    wvs = tf.pack(self._inputs)
    wvs_weighted = tf.mul(tf.reshape(tf.transpose(self.cs), [-1, 1]),
                          tf.reshape(wvs, [-1, in_size]))
    wvs_weighted_reshaped = tf.reshape(wvs_weighted, wvs.get_shape())
    wvsum = tf.reduce_sum(wvs_weighted_reshaped,0)

    pred_mat = tf.get_variable('pred_mat', [in_size, self._out_vocab_size])
    pred_bias = tf.get_variable('pred_bias', [self._out_vocab_size])

    # Make a prediction for each tweet.
    def GetWordPred(o_):
      logits = tf.nn.xw_plus_b(o_, pred_mat, pred_bias)
      return tf.nn.softmax(logits)

    preds = GetWordPred(wvsum)
