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

咨询一下:libtorch c++使用torch::jit::load(“best.pt”, device)异常 #47

Closed
zhigaowu opened this issue Feb 24, 2022 · 2 comments

Comments

@zhigaowu
Copy link

异常信息是:PytorchStreamReader failed locating file constants.pkl: file not found
请问一下:这个模型文件是要做什么处理吗?

@panda-lab
Copy link

是不是路径不对?你把模型的路径写成绝对路径试试?

@zhigaowu
Copy link
Author

应该不是,我是用的是pt文件,这个pkl文件如果需要的话,也应该是pt内部的;
所以,我猜测这个pt的格式可能有点问题。
我使用onnx转换后的格式,使用tensorrt就没问题,可以正常使用

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