peal.adaptors.clarc.extract_all_children¶
- peal.adaptors.clarc.extract_all_children(model, prefix='')[source]¶
Flatten nested
nn.Sequentialcontainers into a list of leaf children.- Parameters:
model (
torch.nn.Module) – Model to walk withnamed_children.prefix (
str) – Dotted name prefix used for recursion.
- Returns:
Modules in forward order and their dotted names. Only
Sequentialis descended into; other containers are returned as single children.- Return type:
(listoftorch.nn.Module,listofstr)