当前位置:网站首页>Update of model_state_dict network part parameters
Update of model_state_dict network part parameters
2022-08-06 02:04:00 【FakeOccupational】
update方法
marks = {
'Physics':67, 'Maths':87}
internal_marks = {
'Practical':48}
marks.update(internal_marks)
print(marks)
# Output: {
'Physics': 67, 'Maths': 87, 'Practical': 48}
不一致时
model.load_state_dict(model_state_dict, strict=False)
保存模型的key多
model_state_dict, optimizer_state_dict = loader(os.path.join(checkpoint_floder, config["model_loadname"]))
model_dict = model.state_dict()
model_state_dict = {
k: v for k, v in model_state_dict.items() if k in model_dict}
model_dict.update(model_state_dict)
model.load_state_dict(model_state_dict)
保存模型的key少
model_state_dict, optimizer_state_dict = loader(os.path.join(checkpoint_floder, config["model_loadname"]))
model_dict = model.state_dict()
model_dict.update(model_state_dict)
model.load_state_dict(model_dict)
边栏推荐
- micro-ros arduino esp32 ros2 笔记
- (shape pressure dp) shortest Hamilton path
- 如何做代码评审?
- miniPCIe接口CAN卡为工控机快速扩展CAN通道
- TS (TypeScript) Binary Operators + , - , * , / , % , << , >> , >>> , & , | , ^ Analysis
- model_state_dict网络部分参数的更新
- 大咖说*计算讲谈社|AI 的价值探索:如何拓展商业边界?
- 关于近期轻量化部署任务的一个小结
- The miniPCIe interface CAN card quickly expands the CAN channel for the industrial computer
- VsCode:用户代码片段 / 自定义代码片段
猜你喜欢
Soul submitted a listing application to the Hong Kong Stock Exchange and continued to develop the social metaverse track
【回顾】树莓派4B与EC200U-CN的建立连接
micro-ros arduino esp32 ros2 笔记
typescript72-已有的类型声明文件(第三方库的类型文件)
typescript75 - create your own type declaration files (provide declarations for existing js)
typescript69 - type declaration file overview
VsCode:用户代码片段 / 自定义代码片段
5、nerf++(pytorch)
案例|工业物联网解决方案•工业互联网云平台
浏览器缓存太多怎么办,清理浏览器缓存的方法
随机推荐
Civil law common sense summary 1
剑指offer第9题
typescript73-创建自己的类型声明文件(项目内共享类型)
C语言 : 文件的操作
两数之和——LeetCode第一题
Soul submitted a listing application to the Hong Kong Stock Exchange and continued to develop the social metaverse track
Nanostar raises more than $200 million for battery material production
mysql 高性能搭建1: Centos7+Mysql7.5搭建主从复制
民法常识总结1
ansible command 模块
Seata Failed to get available servers: endpoint format should like ip:port 报错原因/解决方案汇总版(看完本文必解决问题)
滑动间隔缓存有什么特点呢?
leetcode linked list oj question
方法区、永久代、元空间
SprinBoot集成JWT实现token验证拦截
数据开发的经验
TS(TypeScript) 变量类型
SOAP协议学习和使用
多线程-线程调度
使用MySQL截取JSON串,结果为null