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

IndexError: while accessing the outputs in RBA_celeba.ipynb file #6

Closed
dileeppanigrahi opened this issue Oct 20, 2021 · 1 comment
Closed

Comments

@dileeppanigrahi
Copy link

Hi All,
I am currently studying the paper and trying to run this code,
I've trained 'celeb_baseline', 'celeba_uniconf_adv' & 'celeba_domain_independent' models, but while running the RBA_celeba.ipynb file I've faced some issues in the test and dev output indexing ("IndexError: index 40 is out of bounds for axis 1 with size 39") in the below shells. can you please help me to fix this issue?

dev_outputs = dev['output'][:, subclass_idx + [item+39 for item in subclass_idx]]
test_outputs = test['output'][:, subclass_idx + [item+39 for item in subclass_idx]]

IndexError Traceback (most recent call last)
in
----> 1 dev_outputs = dev['output'][:, subclass_idx + [item+39 for item in subclass_idx]]
2 test_outputs = test['output'][:, subclass_idx + [item+39 for item in subclass_idx]]

IndexError: index 40 is out of bounds for axis 1 with size 39

Note :
Shapes of the Dev and Test results :
dev['output'].shape is (19867, 39)
test['output'].shape is (19962, 39) , but in the script we are accessing the 40th index. can you please help me to understand?

@zywangcode
Copy link
Collaborator

The RBA method works with domain discriminative training, where the output contains twice the class number.

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