'Tests one hot encoding of multiclass labels.'

def testOneHotEncoding(self):

    with self.test_session():
        labels = tf.constant([1, 4, 2], dtype=tf.int32)
        one_hot = preprocessor.one_hot_encoding(labels, num_classes=5)
        one_hot = one_hot.eval()
        self.assertAllEqual([0, 1, 1, 0, 1], one_hot)
