Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在训练自己的数据集时,类别数报错。 #78

Closed
qjh666888 opened this issue Dec 26, 2023 · 2 comments
Closed

在训练自己的数据集时,类别数报错。 #78

qjh666888 opened this issue Dec 26, 2023 · 2 comments

Comments

@qjh666888
Copy link

Traceback (most recent call last):
File "main.py", line 371, in
main(args)
File "main.py", line 254, in main
missing_keys, unexpected_keys = model_without_ddp.load_state_dict(checkpoint['model'], strict=False)
File "/data/qjh/envs/meta-detr/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1052, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for MetaDETR:
size mismatch for category_codes_cls.L.weight_g: copying a param with shape torch.Size([91, 1]) from checkpoint, the shape in current model is torch.Size([10, 1]).
size mismatch for category_codes_cls.L.weight_v: copying a param with shape torch.Size([91, 256]) from checkpoint, the shape in current model is torch.Size([10, 256]).

有人遇到过吗,应该怎么修改

@NHeLv1
Copy link

NHeLv1 commented Feb 28, 2024

您好,想和您讨论一下训练自己数据集的问题,只需要按照coco格式存放就可以了吗

@qjh666888
Copy link
Author

qjh666888 commented Feb 28, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants