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: 'mannii' #12

Open
nikste opened this issue Jul 22, 2020 · 1 comment
Open

KeyError: 'mannii' #12

nikste opened this issue Jul 22, 2020 · 1 comment

Comments

@nikste
Copy link

nikste commented Jul 22, 2020

When running

--experiment_name
test1
--experiment_dir
test1_dir
--image_dir
<path_to>/ETHEC_dataset_v0.2/ETHEC_dataset/IMAGO_build_test_resized
--n_epochs
10
--model
resnet50
--loss
multi_level
--set_mode
train 

it crashes with:

Traceback (most recent call last):
  File "learning_embeddings/network/ethec_experiments.py", line 473, in <module>
    ETHEC_train_model(args)
  File "learning_embeddings/network/ethec_experiments.py", line 361, in ETHEC_train_model
    sampler=None if arguments.class_weights else WeightedResampler(
  File "learning_embeddings/network/experiment.py", line 231, in __init__
    label_ids = [dataset[ind]['leaf_label'] for ind in range(len(dataset))]
  File "learning_embeddings/network/experiment.py", line 231, in <listcomp>
    label_ids = [dataset[ind]['leaf_label'] for ind in range(len(dataset))]
  File "learning_embeddings/data/db.py", line 3789, in __getitem__
    'labels': torch.from_numpy(self.labelmap.get_one_hot(sample['family'], sample['subfamily'], sample['genus'],
  File "learning_embeddings/data/db.py", line 1071, in get_one_hot
    retval[self.genus_specific_epithet[specific_epithet] + self.levels[0] + self.levels[1] + self.levels[2]] = 1
KeyError: 'mannii'

What am i doing wrong ?

@ankitdhall
Copy link
Owner

The readme has been updated to clarify the usage. I hope that helps.

  • use v0.1 of the ETHEC dataset
  • use the Adam1x branch to run CNN-based models for the ETHEC dataset

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