Tencent / NeuralNLP-NeuralClassifier

An Open-source Neural Hierarchical Multi-label Text Classification Toolkit
Other
1.85k stars 406 forks source link

IndexError: tensors used as indices must be long, byte or bool tensors #16

Closed JokerSeven closed 5 years ago

JokerSeven commented 5 years ago

Thanks for your jobs! I want to use this framework to handle multi-label classification task without hierarchical and I set "task_info.hierarchical"=false in conf/train.json. However, I have encountered this problem. Can you tell me how can I use this framwork without hierarchical?

JokerSeven commented 5 years ago

The dataset I used is RCV1, and I did not change other configurations in train.json except task_info.hierarchical.

missrainbow91 commented 5 years ago

I guess you need to modify the file 'rcv1.taxonomy' in file folder 'data', the data in the file is hierarchical, you should change them into without hierarchy.

coderbyr commented 5 years ago

we have fix this problem, please refer the latest version.