统计模型大小的方法统一步骤 1 统计总的参数个数, 2 利用参数个数算出权重大小 pytorch def get_model_size(model): para_num = sum([p.numel() for p in model.parameters()])