Class KeyValueTensorInitializer
Inherits From: TableInitializerBase
Defined in tensorflow/python/ops/lookup_ops.py
.
Table initializers given keys
and values
tensors.
__init__
__init__(
keys,
values,
key_dtype=None,
value_dtype=None,
name=None
)
Constructs a table initializer object based on keys and values tensors.
Args:
keys
: The tensor for the keys.values
: The tensor for the values.key_dtype
: Thekeys
data type. Used whenkeys
is a python array.value_dtype
: Thevalues
data type. Used whenvalues
is a python array.name
: A name for the operation (optional).
Properties
key_dtype
The expected table key dtype.
value_dtype
The expected table value dtype.
Methods
tf.contrib.lookup.KeyValueTensorInitializer.initialize
initialize(table)
Initializes the given table
with keys
and values
tensors.
Args:
table
: The table to initialize.
Returns:
The operation that initializes the table.
Raises:
TypeError
: when the keys and values data types do not match the table key and value data types.