---
title: "ModuleDict"
sidebar_label: "ModuleDict"
description: "The clika_runtime.nn ModuleDict class."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

ModuleDict(modules=None)

    A registered, insertion-ordered mapping from names to modules; look
    them up in your own ``forward``. Constructed from a mapping or an
    iterable of ``(key, module)`` pairs; ``update`` takes the same.
    

## `__init__`

```python
__init__(self, modules: 'Mapping[str, Module] | Iterable[tuple[str, Module]] | None' = None) -> 'None'
```

Initialize self.  See help(type(self)) for accurate signature.

## `clear`

```python
clear(self) -> 'None'
```

clear() -> None

Remove every entry.

## `items`

```python
items(self) -> 'Iterable[tuple[str, Module]]'
```

items() -> the (name, module) pairs, in insertion order.

## `keys`

```python
keys(self) -> 'Iterable[str]'
```

keys() -> the registered names, in insertion order.

## `pop`

```python
pop(self, key: 'str') -> 'Module'
```

pop(key) -> Module

Remove and return the module under ``key``.

## `update`

```python
update(self, modules: 'Mapping[str, Module] | Iterable[tuple[str, Module]]') -> 'None'
```

update(modules) -> None

Add the entries of a mapping, or of an iterable of ``(key, module)``
pairs, overwriting existing keys.

## `values`

```python
values(self) -> 'Iterable[Module]'
```

values() -> the modules, in insertion order.
