Open KazimTibetSar opened 3 years ago
Hello,
train_seq = torch.tensor(tokens_train['input_ids']) train_mask = torch.tensor(tokens_train['attention_mask']) train_y = torch.tensor(train_labels.tolist())
at train_y an error occuring as; ValueError: too many dimensions 'str'
There is my train labels:
0
0 positive 1 negative 2 positive 3 notr 4 positive ... ... 4002 notr 4003 positive 4004 positive 4005 notr 4006 negative
can you help me about that issue
This error cause because of the datatype error Use this above the code:-
train_labels = train_labels.astype(int) val_labels = val_labels.astype(int) test_labels = test_labels.astype(int)
Hello,
for train set
at train_y an error occuring as; ValueError: too many dimensions 'str'
There is my train labels:
0 positive 1 negative 2 positive 3 notr 4 positive ... ... 4002 notr 4003 positive 4004 positive 4005 notr 4006 negative
can you help me about that issue