nnmf_24a/MLP_equivalent/append_parameter.py

8 lines
193 B
Python

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)