import torch


def parameters_list_from_state_dict(model) -> torch.Tensor:
    """
    Get model parameters (weights and biases) and concatenate them

    :param model
    :return: tensor with all weights and biases
    """
    parameters = model.state_dict().values()
    parameters = [x.flatten() for x in parameters]
    parameters = torch.cat(parameters, 0)
    return parameters