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

*** KeyError: 'query_f' #20

Open
IvyYZ opened this issue Nov 1, 2019 · 1 comment
Open

*** KeyError: 'query_f' #20

IvyYZ opened this issue Nov 1, 2019 · 1 comment

Comments

@IvyYZ
Copy link

IvyYZ commented Nov 1, 2019

When I run "python3 evaluate_st.py --name ft_ResNet50_pcb_market_e ", I have some problems.
problem like this:
*** KeyError: 'query_f'
I load model is "model/modelft_ResNet50_pcb_market_e/pytorch_result2.mat", which from the link (baiduyun Link:https://pan.baidu.com/s/1QMp22dVGJvBH45e4XPdeKw password:dn7b).
I checked the code:
result = scipy.io.loadmat('model/'+name+'/'+'pytorch_result2.mat')
I found "result" has no key 'query_f'.
I don't know how to operate.

@Wanggcong
Copy link
Owner

When I run "python3 evaluate_st.py --name ft_ResNet50_pcb_market_e ", I have some problems.
problem like this:
*** KeyError: 'query_f'
I load model is "model/modelft_ResNet50_pcb_market_e/pytorch_result2.mat", which from the link (baiduyun Link:https://pan.baidu.com/s/1QMp22dVGJvBH45e4XPdeKw password:dn7b).
I checked the code:
result = scipy.io.loadmat('model/'+name+'/'+'pytorch_result2.mat')
I found "result" has no key 'query_f'.
I don't know how to operate.

I guess the file path could be incorrect.
"model/modelft_ResNet50_pcb_market_e/pytorch_result2.mat"

should be
"model/ft_ResNet50_pcb_market_e/pytorch_result2.mat"

I think you can check your path, and use the os module to construct the correct path, e.g., os.path.join(xxx,xxx).

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