小编M09*_*009的帖子

Fastai学习者未加载

所以我试图使用以下方式加载模型:

learn = create_cnn(data, models.resnet50, lin_ftrs=[2048], metrics=accuracy) 
learn.clip_grad();
learn.load(f'{name}-stage-2.1')
Run Code Online (Sandbox Code Playgroud)

但我收到以下错误

RuntimeError: Error(s) in loading state_dict for Sequential:
size mismatch for 1.8.weight: copying a param with shape torch.Size([5004, 2048]) from checkpoint, the shape in current model is torch.Size([4542, 2048]).
size mismatch for 1.8.bias: copying a param with shape torch.Size([5004]) from checkpoint, the shape in current model is torch.Size([4542]).
Run Code Online (Sandbox Code Playgroud)

唯一不同的是,我添加了stage-2.1模型中不存在的随机验证拆分,当我删除该拆分并且没有经过验证的集时,因为stage-2.1经过训练的一切进展顺利。

发生了什么?

model machine-learning resnet pytorch fast-ai

8
推荐指数
1
解决办法
386
查看次数

AndroidStudio团队基础服务器

我从发布之日起就开始使用AndroidStudio,而我喜欢它的所有错误.我想问一下是否有人知道如何与我的团队分享我的项目以便在AndroidStudio中工作.像日食的TFS之类的东西.提前致谢

tfs android android-studio

4
推荐指数
1
解决办法
3877
查看次数