鱼C论坛

 找回密码
 立即注册
查看: 1452|回复: 1

faster r-cnn

[复制链接]
发表于 2022-3-15 19:59:53 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
Traceback (most recent call last):
  File "F:/faster-rcnn-pytorch-master/predict.py", line 14, in <module>
    frcnn = FRCNN()
  File "F:\faster-rcnn-pytorch-master\frcnn.py", line 88, in __init__
    self.generate()
  File "F:\faster-rcnn-pytorch-master\frcnn.py", line 99, in generate
    self.net.load_state_dict(torch.load(self.model_path, map_location=device),False)
  File "E:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1224, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for FasterRCNN:
        size mismatch for head.cls_loc.weight: copying a param with shape torch.Size([84, 2048]) from checkpoint, the shape in current model is torch.Size([20, 2048]).
        size mismatch for head.cls_loc.bias: copying a param with shape torch.Size([84]) from checkpoint, the shape in current model is torch.Size([20]).
        size mismatch for head.score.weight: copying a param with shape torch.Size([21, 2048]) from checkpoint, the shape in current model is torch.Size([5, 2048]).
        size mismatch for head.score.bias: copying a param with shape torch.Size([21]) from checkpoint, the shape in current model is torch.Size([5]).
训练faster-r-cnn模型出现这样的问题,有大佬知道这是为什么吗?
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2022-3-17 13:51:53 | 显示全部楼层
:L:);P
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-1-11 23:44

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表