Created
November 12, 2018 21:03
-
-
Save hadifar/a7a35a7b36bcf5e3d2de1ff1d30d57df to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
table = tf.contrib.lookup.index_table_from_file(vocabulary_file="vocab.txt", num_oov_buckets=1) | |
csv_dataset = csv_dataset.map(lambda x, y: (tf.string_split([x]).values, y)) | |
csv_dataset = csv_dataset.map(lambda x, y: (tf.cast(table.lookup(x), tf.int32), y)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment