249cd01eccb5c787779c69292d6262b514c0df8b,tensorflow_transform/saved/saved_transform_io_test.py,SavedTransformIOTest,test_table_roundtrip,#SavedTransformIOTest#,158
Before Change
with tf.compat.v1.Session().as_default() as session:
input_string = tf.compat.v1.placeholder(tf.string)
// Map string through a table, in this case based on a constant tensor.
table = lookup_ops.index_table_from_tensor(
tf.constant(["cat", "dog", "giraffe"]))
output = table.lookup(input_string)
inputs = {"input": input_string}
outputs = {"output": output}
saved_transform_io.write_saved_transform_from_session(
After Change
input_string = tf.compat.v1.placeholder(tf.string)
// Map string through a table, in this case based on a constant tensor.
table_keys = ["cat", "dog", "giraffe"]
initializer = tf.lookup.KeyValueTensorInitializer(
keys=table_keys,
values=tf.cast(tf.range(len(table_keys)), tf.int64),
key_dtype=tf.string,
value_dtype=tf.int64)
table = tf.lookup.StaticHashTable(initializer, default_value=-1)
output = table.lookup(input_string)
inputs = {"input": input_string}
outputs = {"output": output}
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 11
Instances Project Name: tensorflow/transform
Commit Name: 249cd01eccb5c787779c69292d6262b514c0df8b
Time: 2019-05-31
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/saved/saved_transform_io_test.py
Class Name: SavedTransformIOTest
Method Name: test_table_roundtrip
Project Name: tensorflow/transform
Commit Name: 249cd01eccb5c787779c69292d6262b514c0df8b
Time: 2019-05-31
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/saved/saved_transform_io_test.py
Class Name: SavedTransformIOTest
Method Name: test_table_roundtrip
Project Name: tensorflow/transform
Commit Name: 1715fe645f8f86e5a05deae0a0611bef895e2aec
Time: 2019-06-12
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/graph_tools_test.py
Class Name:
Method Name: _create_graph_with_table_initialized_by_table_output
Project Name: tensorflow/transform
Commit Name: 1715fe645f8f86e5a05deae0a0611bef895e2aec
Time: 2019-06-12
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/saved/saved_transform_io_test.py
Class Name: SavedTransformIOTest
Method Name: test_table_roundtrip
Project Name: tensorflow/transform
Commit Name: 249cd01eccb5c787779c69292d6262b514c0df8b
Time: 2019-05-31
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/graph_tools_test.py
Class Name:
Method Name: _create_graph_with_table_initialized_by_table_output