Giter VIP home page Giter VIP logo

Comments (6)

xjtuleeyf avatar xjtuleeyf commented on May 28, 2024

您好,我想补充一下我的问题,我现在好像发现了问题所在,self.hierarchical_class好像是对题目中的标签的个数统计,也就是说,比如我的知识结构中的一级标签是A1,A2,A3等,但是他们从未以一个单独的标签在knowledge中出现过,都是以A1-A12-A123的形式出现的,所以相当于模型默认了我只有二级标签和三级标签,是这个意思吗?如果是这样的话有什么解决方案呢,期待您的回复,多谢

from neuralnlp-neuralclassifier.

MagiaSN avatar MagiaSN commented on May 28, 2024

可以把一、二级标签也补充到数据中,例如一条数据标签为["A1-A12-A123"],将父类目也扩充到标签中,变为["A1", "A1-A2", "A1-A12-A123"]

from neuralnlp-neuralclassifier.

xjtuleeyf avatar xjtuleeyf commented on May 28, 2024

明白了,感谢解答,麻烦还有一个小问题想请教您,在修改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.

xjtuleeyf avatar xjtuleeyf commented on May 28, 2024

另外还想请问一下存储标签层次的taxonomy文件在哪个部分发挥作用呢?

from neuralnlp-neuralclassifier.

MagiaSN avatar MagiaSN commented on May 28, 2024

另外还想请问一下存储标签层次的taxonomy文件在哪个部分发挥作用呢?

taxonomy文件中包含的标签父子关系会用于loss中的hierarchical penalty计算等

from neuralnlp-neuralclassifier.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.