摘要: 本文主要解决模型权重迁移,主要使用pytorch读取某个权重,将其赋值给新权重格式,以下为原始代码: 顺带参数计算函数代码: 参数计算: def count_parameters(model): return sum(p.numel() for p in model.parameters() if 阅读全文
posted @ 2022-03-15 16:33 tangjunjun 阅读(850) 评论(0) 推荐(0) 编辑
https://rpc.cnblogs.com/metaweblog/tangjunjun