def all_children(model):
    """Return a list of all child modules of the model, and their children, and their children's children, ..."""
    children = list(model.children())
    for child in model.children():
        children.extend(all_children(child))
    return children