Bernstein_Poster_2024/max_pooling_mlp/append_parameter.py

9 lines
193 B
Python
Raw Permalink Normal View History

2024-10-21 16:43:42 +02:00
import torch
def append_parameter(
module: torch.nn.Module, parameter_list: list[torch.nn.parameter.Parameter]
):
for netp in module.parameters():
parameter_list.append(netp)