Tencent / NeuralNLP-NeuralClassifier

An Open-source Neural Hierarchical Multi-label Text Classification Toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

only support hierarchical text classification with BCELoss?

guancheng817 opened this issue · comments

Hi, thanks for your works. One question is that I see "only support hierarchical text classification with BCELoss?" in loss.py, why does it only support with BCELoss? Is it useless for SoftmaxCrossEntropy? Thanks again..

Hi, thanks for your works. One question is that I see "only support hierarchical text classification with BCELoss?" in loss.py, why does it only support with BCELoss? Is it useless for SoftmaxCrossEntropy? Thanks again..

Actually, the hierarchical regularization loss is mostly used for multi label classification. The main point of this method is forcing the parameters of parent node and children node to be closely in vector space. so generally, you can also use this loss in other condition as well as you can get the parent and children parameters respectively.