Bernstein_Poster_2024/avg_pooling_mlp_x4/append_parameter.py

9 lines
193 B
Python
Raw Permalink Normal View History

2024-11-05 18:20:02 +01: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)