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

Data loader class issues while mapping #4

Open
bilalbaloch1 opened this issue Jul 24, 2020 · 1 comment
Open

Data loader class issues while mapping #4

bilalbaloch1 opened this issue Jul 24, 2020 · 1 comment

Comments

@bilalbaloch1
Copy link

I am using my dataset having three labels 0,1,2. While loading the dataset in data_loader class it generates key error. I think the issue is of mapping please guide.

Traceback (most recent call last):
  File "train.py", line 415, in <module>
    run(args)
  File "train.py", line 219, in run
    texts, labels, number_of_classes, sample_weights = load_data(args)
  File "/content/character-based-cnn/src/data_loader.py", line 55, in load_data
    map(lambda l: {1: 0, 2: 0, 4: 1, 5: 1, 7: 2, 8: 2}[l], labels))
  File "/content/character-based-cnn/src/data_loader.py", line 55, in <lambda>
    map(lambda l: {1: 0, 2: 0, 4: 1, 5: 1, 7: 2, 8: 2}[l], labels))
KeyError: '1'
@tbass134
Copy link

tbass134 commented Jul 31, 2020

add --group_labels=0 as an argument when calling train.py.
also, this only support binary classification(0,1)

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