You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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'
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: