class tf.contrib.lookup.KeyValueTensorInitializerTable initializers given keys and values tensors.
key_dtypeThe expected table key dtype.
value_dtypeThe expected table value dtype.
__init__(keys, values, key_dtype=None, value_dtype=None, name=None)Constructs a table initializer object based on keys and values tensors.
keys: The tensor for the keys.values: The tensor for the values.key_dtype: The keys data type. Used when keys is a python array.value_dtype: The values data type. Used when values is a python array.name: A name for the operation (optional).initialize(table)Initializes the given table with keys and values tensors.
table: The table to initialize.The operation that initializes the table.
TypeError: when the keys and values data types do not match the table key and value data types.Defined in tensorflow/contrib/lookup/lookup_ops.py.
© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/lookup/KeyValueTensorInitializer