-
Notifications
You must be signed in to change notification settings - Fork 54
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
infer.py doesn't work, variable referenced before assignment #52
Comments
Move the if else loop out of the load head loop will solve this problem.
|
Still does not work, model loading failed. |
The solution works for me. Thanks |
Hi, Can any of you guide me , I trained the code on my custom dataset and when i am trying to do the inference it gives me error that model key is not in the state_dict. |
Hi, thanks for the work!
But I think there is an obvious bug at line 56 in src_files/models/utils/factory.py:
model.load_state_dict(state[key], strict=True)
The variable
key
in else branch is used without definition. So whenload_head
argument is True, which True in infer.py, the code doesn't work.The text was updated successfully, but these errors were encountered: