登录社区云,与社区用户共同成长
邀请您加入社区
该用户还未填写简介
暂无可提供的服务
total_num = sum(p.numel() for p in model.parameters()) # 统计模型所有参数的总数trainable_num = sum(p.numel() for p in model.parameters() if p.requires_grad) # 统计可训练参数数量p.numel():返回单个参数张量的元素个数(即参数数量)。该函数返回一个字典,包含