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

feature extract error #131

Open
budaLi opened this issue Jul 18, 2022 · 5 comments
Open

feature extract error #131

budaLi opened this issue Jul 18, 2022 · 5 comments

Comments

@budaLi
Copy link

budaLi commented Jul 18, 2022

image

@wenmengzhou
Copy link
Collaborator

wenmengzhou commented Jul 19, 2022

can you attach the exported checkpoint and give the model info

@budaLi
Copy link
Author

budaLi commented Jul 19, 2022

看起来是训练时候的配置参数是OrderDict类型的,不支持直接写入
image

@budaLi
Copy link
Author

budaLi commented Jul 19, 2022

can you attach the exported checkpoint and give the model info

请问有比较好的解决方法嘛

@wenmengzhou
Copy link
Collaborator

can you attach the exported checkpoint and give the model info

请问有比较好的解决方法嘛

看起来你是直接用的训练保存的checkpoint做预测,而没有进行export模型?

@MuhammadHakami
Copy link

exported the model and still faced the same issue. it was due to the TorchFeatureExtractor writing the dictionary model configs into a disk while expecting it as a string. for a quick walkaround, just replace "ofile.write(config_str)" in line 48 with:

import json
json.dump(config_str, ofile)

silly issue. maybe some other models have the value config checkpoint['meta']['config'] as a string.

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

3 participants