Commit 2e5cbaac authored by Christopher Shallue's avatar Christopher Shallue
Browse files

Wrap dict.keys() and dict.values() in list() for Python3 compatibility.

parent b5574d2a
...@@ -185,8 +185,8 @@ def build_dataset(file_pattern, ...@@ -185,8 +185,8 @@ def build_dataset(file_pattern,
# Create a HashTable mapping label strings to integer ids. # Create a HashTable mapping label strings to integer ids.
table_initializer = tf.contrib.lookup.KeyValueTensorInitializer( table_initializer = tf.contrib.lookup.KeyValueTensorInitializer(
keys=input_config.label_map.keys(), keys=list(input_config.label_map.keys()),
values=input_config.label_map.values(), values=list(input_config.label_map.values()),
key_dtype=tf.string, key_dtype=tf.string,
value_dtype=tf.int32) value_dtype=tf.int32)
label_to_id = tf.contrib.lookup.HashTable( label_to_id = tf.contrib.lookup.HashTable(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment