# tf.contrib.lookup.LookupInterface

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/lookup_ops.py#L107-L145) |

Represent a lookup table that persists across different steps.

    tf.contrib.lookup.LookupInterface(
        key_dtype, value_dtype
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `key_dtype` | The table key type. |
| `value_dtype` | The table value type. |

<br />

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `key_dtype` | The table key dtype. |
| `name` | The name of the table. |
| `resource_handle` | Returns the resource handle associated with this Resource. |
| `value_dtype` | The table value dtype. |

<br />

## Methods

### `lookup`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/lookup_ops.py#L143-L145)

    lookup(
        keys, name=None
    )

Looks up `keys` in a table, outputs the corresponding values.

### `size`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/lookup_ops.py#L139-L141)

    size(
        name=None
    )

Compute the number of elements in this table.