# tf.contrib.checkpoint.Mapping

<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/training/tracking/data_structures.py#L585-L653) |

An append-only trackable mapping data structure with string keys.

    tf.contrib.checkpoint.Mapping(
        *args, **kwargs
    )

Maintains checkpoint dependencies on its contents (which must also be
trackable), named based on its keys.

Note that once a key has been added, it may not be deleted or replaced. If
names may not be unique, see [`tf.contrib.checkpoint.UniqueNameTracker`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/checkpoint/UniqueNameTracker).

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `layers` | <br /> <br /> |
| `losses` | Aggregate losses from any `Layer` instances. |
| `non_trainable_variables` | <br /> <br /> |
| `non_trainable_weights` | <br /> <br /> |
| `trainable` | <br /> <br /> |
| `trainable_variables` | <br /> <br /> |
| `trainable_weights` | <br /> <br /> |
| `updates` | Aggregate updates from any `Layer` instances. |
| `variables` | <br /> <br /> |
| `weights` | <br /> <br /> |

<br />

## Methods

### `get`

    get(
        key, default=None
    )

D.get(k\[,d\]) -\> D\[k\] if k in D, else d. d defaults to None.

### `items`

    items()

D.items() -\> a set-like object providing a view on D's items

### `keys`

    keys()

D.keys() -\> a set-like object providing a view on D's keys

### `update`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/training/tracking/data_structures.py#L639-L641)

    update(
        *args, **kwargs
    )

### `values`

    values()

D.values() -\> an object providing a view on D's values

### `__contains__`

    __contains__(
        key
    )

### `__eq__`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/training/tracking/data_structures.py#L247-L250)

    __eq__(
        other
    )

Return self==value.

### `__getitem__`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/training/tracking/data_structures.py#L643-L644)

    __getitem__(
        key
    )

### `__iter__`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/training/tracking/data_structures.py#L652-L653)

    __iter__()

### `__len__`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/training/tracking/data_structures.py#L646-L647)

    __len__()