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

yolov5s.pt微调后在生成.wts报错,改了数据类别,但类别总数不变。麻烦大大帮忙看看~谢谢!!new.pt是我微调后的模型 #1517

Open
USTBZcb opened this issue May 9, 2024 · 1 comment

Comments

@USTBZcb
Copy link

USTBZcb commented May 9, 2024

jetson@yahboom:~/yolov5$ python3 gen_wts.py -w new.pt
Traceback (most recent call last):
File "gen_wts.py", line 33, in
model = torch.load(pt_file, map_location=device)
File "/home/jetson/.local/lib/python3.6/site-packages/torch/serialization.py", line 592, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "/home/jetson/.local/lib/python3.6/site-packages/torch/serialization.py", line 851, in _load
result = unpickler.load()
AttributeError: Can't get attribute 'DetectionModel' on <module 'models.yolo' from '/home/jetson/yolov5/models/yolo.py'>

@wang-xinyu
Copy link
Owner

gen_wts在训练机器上导出即可

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