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

Key Error in training pix2pix with unaligned data #25

Open
Ashish-Abraham opened this issue Oct 1, 2022 · 0 comments
Open

Key Error in training pix2pix with unaligned data #25

Ashish-Abraham opened this issue Oct 1, 2022 · 0 comments

Comments

@Ashish-Abraham
Copy link

I have been trying to train a pix2pix model on ukiyoe2photo dataset as given in this notebook by SnapML. The create_eval_dataloader function is giving a key error with the following log.

Traceback (most recent call last):
File "train.py", line 14, in
trainer.start()
File "/content/CAT/trainer.py", line 328, in start
(epoch, total_iter))
File "/content/CAT/trainer.py", line 272, in evaluate
metrics = self.model.evaluate_model(iter)
File "/content/CAT/models/pix2pix_model.py", line 507, in evaluate_model
self.set_input(data_i)
File "/content/CAT/models/pix2pix_model.py", line 439, in set_input
self.real_A = input['A' if AtoB else 'B'].to(self.device)
KeyError: 'B'

Seems like the data produced by the eval_dataloader contains only 2 keys: 'A' and 'A_paths'. Apparently it has no 'B' and 'B_paths' field.
It would be great if you may help me with it.

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

1 participant