Tencent / NeuralNLP-NeuralClassifier

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

使用HMCN训练rcv1数据集报错 #79

Closed erag closed 3 years ago

erag commented 3 years ago

修改了配置文件中的训练模型 "task_info":{ "label_type": "multi_label", "hierarchical": true, "hierarchical_model": true, "hierar_taxonomy": "data/rcv1.taxonomy", "hierar_penalty": 0.000001 }, "device": "cuda", "model_name": "HMCN", 运行train.py 出现如下错误: hierarchy_classes: [102] Traceback (most recent call last): File "train.py", line 257, in <module> train(config) File "train.py", line 210, in train model = get_classification_model(model_name, empty_dataset, conf) File "train.py", line 82, in get_classification_model model = globals()[model_name](dataset, conf) File "D:\edgedownload\NeuralNLP-NeuralClassifier-master\model\classification\hmcn.py", line 58, in __init__ torch.nn.Linear(self.global2local[i], self.hierarchical_class[i-1]) IndexError: list index out of range

jasonmfang commented 3 years ago

+1

coderbyr commented 3 years ago

add toy data for hmcn, please try again.