Comments (6)
您好,我想补充一下我的问题,我现在好像发现了问题所在,self.hierarchical_class好像是对题目中的标签的个数统计,也就是说,比如我的知识结构中的一级标签是A1,A2,A3等,但是他们从未以一个单独的标签在knowledge中出现过,都是以A1-A12-A123的形式出现的,所以相当于模型默认了我只有二级标签和三级标签,是这个意思吗?如果是这样的话有什么解决方案呢,期待您的回复,多谢
from neuralnlp-neuralclassifier.
可以把一、二级标签也补充到数据中,例如一条数据标签为["A1-A12-A123"]
,将父类目也扩充到标签中,变为["A1", "A1-A2", "A1-A12-A123"]
from neuralnlp-neuralclassifier.
明白了,感谢解答,麻烦还有一个小问题想请教您,在修改global2local的参数之后,代码不再报之前的错误了,但是在loss.py和train.py中的有个参数logits,总是报错这个参数应该是一个tensor,实际上是一个长度为3的tuple,为了让代码正常运行,我在loss.py和train.py中的报错位置加入了logits = logits[0],经过运行发现效果(F1 = 0.50)远差于利用TextRNN的结果(F1 = 0.74),而且在用TextRNN运行模型的时候不会报这种错误,期待得到您的解答!
from neuralnlp-neuralclassifier.
另外还想请问一下存储标签层次的taxonomy文件在哪个部分发挥作用呢?
from neuralnlp-neuralclassifier.
另外还想请问一下存储标签层次的taxonomy文件在哪个部分发挥作用呢?
taxonomy文件中包含的标签父子关系会用于loss中的hierarchical penalty计算等
from neuralnlp-neuralclassifier.
Related Issues (20)
- why use word frequency as word id? any good to do it? HOT 1
- does TNeuralNLP-NeuralClassifier use fixed length as input with padding or non-fixed length ? HOT 1
- how to handle unknow vocabulary on Tencent / NeuralNLP-NeuralClassifier HOT 1
- Hi, is there an example predict.json file for reference? HOT 1
- HMCN RuntimeError: The size of tensor a (13) must match the size of tensor b (10) at non-singleton dimension 1 HOT 2
- f-score 等于 0 HOT 1
- very low performance HOT 1
- HMCN模型在Evaluation时报错 HOT 1
- 构建dict_rcv1/doc_label.dict 时采用的是json文件而非taxonomy文件 HOT 9
- 使用Hierar效果反而不如Flat HOT 3
- RCV1数据集 HOT 1
- HMCN模型的代码实现里面,没有Hierarchical Violation Penalty loss ? HOT 2
- 运行python train.py conf/train.hmcn.json 报错RuntimeError: 'lengths' argument should be a 1D CPU int64 tensor, but got 1D cuda:0 Long tensor HOT 1
- "predict.py" produces blank output file HOT 2
- 请问这个层次分类支持bert吗? HOT 1
- HMCN是怎么同时考虑层次标签之间关系的呢? HOT 1
- 在进行中文文本分类出现了这个错误TypeError: cannot unpack non-iterable NoneType object
- 训练hierarchical classifier with HMCN应该如何修改分类的层级
- Any guide for generating taxonomy file? (hierar_taxonomy: A text file describes taxonomy.) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neuralnlp-neuralclassifier.