You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(pytorch) C:\Users\xz1005\YOLOX-main>python export_onnx.py --output-name yolox_l.onnx -n yolox-l -c preModels/l_best_epoch_weights.pth
2022-06-06 20:36:31.964 | INFO | main:main:66 - args value: Namespace(output_name='yolox_l.onnx', input='images', output='output', opset=11, batch_size=1, dynamic=False, no_onnxsim=False, exp_file=None, experiment_name=None, name='yolox-l', ckpt='preModels/l_best_epoch_weights.pth', opts=[], decode_in_inference=False)
2022-06-06 20:36:32.856 | ERROR | main::135 - An error has been caught in function '', process 'MainProcess' (14972), thread 'MainThread' (14748):
Traceback (most recent call last):
File "C:\Users\xz1005\YOLOX-main\export_onnx.py", line 135, in
main()
└ <function main at 0x00000245E20AA1F0>
File "C:\Users\xz1005\YOLOX-main\export_onnx.py", line 86, in main
model.load_state_dict(ckpt)
│ │ └ OrderedDict([('backbone.backbone.stem.conv.conv.weight', tensor([[[[ 0.0023, 0.0232, 0.0038],
│ │ [ 0.0459, -0.2495, ...
│ └ <function Module.load_state_dict at 0x00000245E0C22430>
└ YOLOX(
(backbone): YOLOPAFPN(
(backbone): CSPDarknet(
(stem): Focus(
(conv): BaseConv(
(conv): ...
File "D:\anaconda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1497, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for YOLOX:
size mismatch for head.cls_preds.0.weight: copying a param with shape torch.Size([10, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([80, 256, 1, 1]).
size mismatch for head.cls_preds.0.bias: copying a param with shape torch.Size([10]) from checkpoint, the shape in current model is torch.Size([80]).
size mismatch for head.cls_preds.1.weight: copying a param with shape torch.Size([10, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([80, 256, 1, 1]).
size mismatch for head.cls_preds.1.bias: copying a param with shape torch.Size([10]) from checkpoint, the shape in current model is torch.Size([80]).
size mismatch for head.cls_preds.2.weight: copying a param with shape torch.Size([10, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([80, 256, 1, 1]).
size mismatch for head.cls_preds.2.bias: copying a param with shape torch.Size([10]) from checkpoint, the shape in current model is torch.Size([80]).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
(pytorch) C:\Users\xz1005\YOLOX-main>python export_onnx.py --output-name yolox_l.onnx -n yolox-l -c preModels/l_best_epoch_weights.pth
2022-06-06 20:36:31.964 | INFO | main:main:66 - args value: Namespace(output_name='yolox_l.onnx', input='images', output='output', opset=11, batch_size=1, dynamic=False, no_onnxsim=False, exp_file=None, experiment_name=None, name='yolox-l', ckpt='preModels/l_best_epoch_weights.pth', opts=[], decode_in_inference=False)
2022-06-06 20:36:32.856 | ERROR | main::135 - An error has been caught in function '', process 'MainProcess' (14972), thread 'MainThread' (14748):
Traceback (most recent call last):
File "C:\Users\xz1005\YOLOX-main\export_onnx.py", line 86, in main
model.load_state_dict(ckpt)
│ │ └ OrderedDict([('backbone.backbone.stem.conv.conv.weight', tensor([[[[ 0.0023, 0.0232, 0.0038],
│ │ [ 0.0459, -0.2495, ...
│ └ <function Module.load_state_dict at 0x00000245E0C22430>
└ YOLOX(
(backbone): YOLOPAFPN(
(backbone): CSPDarknet(
(stem): Focus(
(conv): BaseConv(
(conv): ...
File "D:\anaconda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1497, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for YOLOX:
size mismatch for head.cls_preds.0.weight: copying a param with shape torch.Size([10, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([80, 256, 1, 1]).
size mismatch for head.cls_preds.0.bias: copying a param with shape torch.Size([10]) from checkpoint, the shape in current model is torch.Size([80]).
size mismatch for head.cls_preds.1.weight: copying a param with shape torch.Size([10, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([80, 256, 1, 1]).
size mismatch for head.cls_preds.1.bias: copying a param with shape torch.Size([10]) from checkpoint, the shape in current model is torch.Size([80]).
size mismatch for head.cls_preds.2.weight: copying a param with shape torch.Size([10, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([80, 256, 1, 1]).
size mismatch for head.cls_preds.2.bias: copying a param with shape torch.Size([10]) from checkpoint, the shape in current model is torch.Size([80]).
Beta Was this translation helpful? Give feedback.
All reactions