-
Notifications
You must be signed in to change notification settings - Fork 484
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
A little bit confuse with KeyError: 'a' #47
Comments
hi, i got the problem too, when run the test.py file, did u fix it? @JSharp4273 Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): |
if use gen_0****.pt, it's ok, but what's the dis_0****.pt and optimizer.pt, |
I meet the same problem too. I use the gen_*.pt when test. |
Hello
I am trained MUNIT to make conversion of from 14 bit per pixel infrared data to colour images.
The training run without any particular issue.
Then I try to evaluate my model by tuning the test.py scripty but I encounter that message:
Traceback (most recent call last):
File "test.py", line 55, in
trainer.gen_a.load_state_dict(state_dict['a'])
KeyError: 'a'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test.py", line 58, in
state_dict = pytorch03_to_pytorch04(torch.load(opts.checkpoint), opts.trainer)
File "/hdd1/prog/MUNIT/utils.py", line 372, in pytorch03_to_pytorch04
state_dict['a'] = __conversion_core(state_dict_base['a'], trainer_name)
KeyError: 'a'
If I well understand it does not find the weights ?
After the training I used the file "optimizer.pt" as model because I did not have a more explicit filename regarding the name of my dataset.
The text was updated successfully, but these errors were encountered: