Closed sixone-Jiang closed 8 months ago
I don`t know if I use 'strict=False' when load checkpoint is OK? or may be I should compare the param dict structure difference ?
@sixone-Jiang These error won't happen in my models/detectors/yolov1/yolov1_backbone.py
. You can refer to my code to check if there are bugs in your code. Maybe stride=False
can work as I used it in my code.
Thanks for your reply, I just try to refer your code, but these bugs still occurs; In my view, may be I use torch version ''2.0.1+cu117'' have some deference with your default version '1.9.1'?
@sixone-Jiang The version of torch is fine. I suggest you to check the class ResNet()
and def build_resnet18()
in my models/detectors/yolov1/yolov1_backbone.py
file. In my code file, I have remove the self.avgpool
and self.fc
which are defined in the official ResNet(torchvision), so I have to set strict=False
in my def build_resnet18()
. I think this difference might be essential for your problem.
@yjh0410 Thanks!
When load the pretrain resnet18, like:
how can I fix it?