contrib.lookup.LookupInterface
tf.contrib.lookup.LookupInterface
class tf.contrib.lookup.LookupInterface
Defined in tensorflow/contrib/lookup/lookup_ops.py
.
Represent a lookup table that persists across different steps.
Properties
init
The table initialization op.
key_dtype
The table key dtype.
name
The name of the table.
value_dtype
The table value dtype.
Methods
__init__
__init__( key_dtype, value_dtype, name )
Construct a lookup table interface.
Args:
-
key_dtype
: The table key type. -
value_dtype
: The table value type. -
name
: A name for the operation (optional).
check_table_dtypes
check_table_dtypes( key_dtype, value_dtype )
Check that the given key_dtype and value_dtype matches the table dtypes.
Args:
-
key_dtype
: The key data type to check. -
value_dtype
: The value data type to check.
Raises:
-
TypeError
: when 'key_dtype' or 'value_dtype' doesn't match the table data types.
lookup
lookup( keys, name=None )
Looks up keys
in a table, outputs the corresponding values.
size
size(name=None)
Compute the number of elements in this table.
© 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/LookupInterface