from torch.utils import collect_env


def get_info_env():
    return collect_env.get_pretty_env_info()

def count_parameters(model):
    return sum(p.numel() for p in model.parameters() if p.requires_grad)