当前位置:网站首页>预训练模型参数不匹配
预训练模型参数不匹配
2022-06-28 05:40:00 【TBYourHero】
model = ViT(num_classes=10)
ckpt = torch.load('vit-in1k.pth', map_location='cpu')
msg = model.load_state_dict(ckpt, strict=False)
print(msg)# 剔除掉,不加载即可
ckpt.pop('head.weight')
ckpt.pop('head.bias')
边栏推荐
猜你喜欢
随机推荐
Codeworks 5 questions per day (1700 for each)
Blog login box
Oracle 常用基础函数
ipvs 导致syn 重传问题
PS effect understanding record 2 color_ dodge color_ burn
Shanghai Yuge ASR CAT1 4G module 2-way low power 4G application
TypeScript基础类型
Gee learning notes 3- export table data
Share a powerful tool for factor Mining: genetic programming
上海域格ASR CAT1 4g模块2路保活低功耗4G应用
猿粉猿动力-开发者活动袭!
【Linux】——使用xshell在Linux上安装MySQL及实现Webapp的部署
5g network overall architecture
2022年全国职业院校技能大赛“网络安全”竞赛试题官方答案
Important basis for ERP software company selection
Comparison between relational database and document database
Why does the company choose cloud database? What is its charm!
Determine whether an attribute exists in an object
Cryptography notes
6. graduation design temperature and humidity monitoring system (esp8266 + DHT11 +oled real-time upload temperature and humidity data to the public network server and display the real-time temperature








