C:\ProgramData\Anaconda3\envs\ysfish\lib\site-packages\torch\functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ..\aten\src\ATen\native\TensorShape.cpp:2157.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
2022-03-13 02:10:58.072 | INFO | main:main:104 - Model Summary: Params: 5.03M, Gflops: 15.15
2022-03-13 02:10:58.224 | INFO | main:main:117 - loading checkpoint
Traceback (most recent call last):
File "fishing.py", line 223, in
main(exp, args)
File "fishing.py", line 120, in main
model.load_state_dict(ckpt["model"])
File "C:\ProgramData\Anaconda3\envs\ysfish\lib\site-packages\torch\nn\modules\module.py", line 1483, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for YOLOX:
size mismatch for head.cls_preds.0.weight: copying a param with shape torch.Size([80, 96, 1, 1]) from checkpoint, the shape in current model is torch.Size([7, 96, 1, 1]).
size mismatch for head.cls_preds.0.bias: copying a param with shape torch.Size([80]) from checkpoint, the shape in current model is torch.Size([7]).
size mismatch for head.cls_preds.1.weight: copying a param with shape torch.Size([80, 96, 1, 1]) from checkpoint, the shape in current model is torch.Size([7, 96, 1, 1]).
size mismatch for head.cls_preds.1.bias: copying a param with shape torch.Size([80]) from checkpoint, the shape in current model is torch.Size([7]).
size mismatch for head.cls_preds.2.weight: copying a param with shape torch.Size([80, 96, 1, 1]) from checkpoint, the shape in current model is torch.Size([7, 96, 1, 1]).
size mismatch for head.cls_preds.2.bias: copying a param with shape torch.Size([80]) from checkpoint, the shape in current model is torch.Size([7]).
C:\ProgramData\Anaconda3\envs\ysfish\lib\site-packages\torch\functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ..\aten\src\ATen\native\TensorShape.cpp:2157.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] 2022-03-13 02:10:58.072 | INFO | main:main:104 - Model Summary: Params: 5.03M, Gflops: 15.15 2022-03-13 02:10:58.224 | INFO | main:main:117 - loading checkpoint Traceback (most recent call last): File "fishing.py", line 223, in
main(exp, args)
File "fishing.py", line 120, in main
model.load_state_dict(ckpt["model"])
File "C:\ProgramData\Anaconda3\envs\ysfish\lib\site-packages\torch\nn\modules\module.py", line 1483, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for YOLOX:
size mismatch for head.cls_preds.0.weight: copying a param with shape torch.Size([80, 96, 1, 1]) from checkpoint, the shape in current model is torch.Size([7, 96, 1, 1]).
size mismatch for head.cls_preds.0.bias: copying a param with shape torch.Size([80]) from checkpoint, the shape in current model is torch.Size([7]).
size mismatch for head.cls_preds.1.weight: copying a param with shape torch.Size([80, 96, 1, 1]) from checkpoint, the shape in current model is torch.Size([7, 96, 1, 1]).
size mismatch for head.cls_preds.1.bias: copying a param with shape torch.Size([80]) from checkpoint, the shape in current model is torch.Size([7]).
size mismatch for head.cls_preds.2.weight: copying a param with shape torch.Size([80, 96, 1, 1]) from checkpoint, the shape in current model is torch.Size([7, 96, 1, 1]).
size mismatch for head.cls_preds.2.bias: copying a param with shape torch.Size([80]) from checkpoint, the shape in current model is torch.Size([7]).
这是报错代码