def zerolike_params_dict(model: Module) -> Dict[str, "ParamData"]:
    """
    Create a list of (name, parameter), where parameter is initalized to zero.
    The list has as many parameters as model, with the same size.

    :param model: a pytorch model
    """

    return dict(
        [
            (k, ParamData(k, p.shape, device=p.device))
            for k, p in model.named_parameters()
        ]
    )

    Create a list of (name, parameter), where parameter is initalized to zero.
    The list has as many parameters as model, with the same size.

    :param model: a pytorch model
    
avalanche/training/utils.py