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

pt2onnx---export.py #126

Open
gottastudy opened this issue Apr 23, 2024 · 1 comment
Open

pt2onnx---export.py #126

gottastudy opened this issue Apr 23, 2024 · 1 comment

Comments

@gottastudy
Copy link

老师,您好!
请问可否出一个export.py文件,实现将
torch.save(model, os.path.join(save_dir, "ep%03d-loss%.3f-val_loss%.3f.pt" % (epoch + 1, loss / epoch_step, val_loss / epoch_step_val)))
保存的.pt文件转换为.onnx文件。
万分感谢!

@gottastudy
Copy link
Author

注意到您将源码的yolov5s.yaml文件修改为了YoloBody类。在使用官方提供的export.py文件导出时出现AttributeError: 'YoloBody' object has no attribute 'get'错误。请问有比较好的解决思路吗?

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

1 participant