r"""Returns an iterable of key-submodule pairs for all the submodules that are direct attributes of this module, where 'key' is the attribute name of submodules.
(self, **kwargs)
| 338 | ) |
| 339 | |
| 340 | def named_children(self, **kwargs) -> "Iterable[Tuple[str, Module]]": |
| 341 | r"""Returns an iterable of key-submodule pairs for all the submodules that are |
| 342 | direct attributes of this module, where 'key' is the attribute name of |
| 343 | submodules. |
| 344 | """ |
| 345 | yield from self._flatten( |
| 346 | with_key=True, predicate=_is_module, recursive=False, **kwargs |
| 347 | ) |
| 348 | |
| 349 | def modules(self, **kwargs) -> "Iterable[Module]": |
| 350 | r"""Returns an iterable for all the modules within this module, including itself.""" |