(model: torch.nn.Module, name: str)
| 355 | |
| 356 | |
| 357 | def _get_submodule_by_name(model: torch.nn.Module, name: str) -> torch.nn.Module | list[torch.nn.Module]: |
| 358 | if name.count("*") > 1: |
| 359 | raise ValueError("Wildcard '*' can only be used once in the name") |
| 360 | return _find_submodule_by_name(model, name) |
| 361 | |
| 362 | |
| 363 | def _find_submodule_by_name(model: torch.nn.Module, name: str) -> torch.nn.Module | list[torch.nn.Module]: |
no test coverage detected
searching dependent graphs…