向AI转型的程序员都关注了这个号👇👇👇
机器学习AI算法工程 公众号:datayx
它有各种文本分类的原型模型。虽然这些模型中的许多都很简单,但有些模型是经典的,所以它们可以很好地作为基础模型。每个模型在模型类下都有一个测试函数。你可以跑它先执行测试任务。模型独立于数据集。
在这里查看大规模多标签文本分类的正式文档,并进行深入学习。这里的几个模型也可以用于问题回答(有上下文或无上下文)建模,或者进行序列生成。我们探索了两个seq2seq模型(seq2seq with attention,transformer attention is all you needed)来进行文本分类。这两个模型也可以用于序列生成和其他任务。如果您的任务是多标签分类,您可以将问题强制转换为序列生成。
我们实现了两个记忆网络。一个是动态存储器网络。在此之前,它达到了相关的最新水平。回答、情绪分析和顺序生成任务。这就是所谓的一个模型来完成几个不同的任务,达到高性能。它有四个模块。关键部件是情景记忆模块。它使用门机制来注意性能,并使用选通GRU更新情节记忆,然后它有另一个GRU(垂直方向)来性能隐藏状态更新。它具有进行传递性推理的能力。我们实现的第二个内存网络是循环实体网络:跟踪世界状态。它有几个街区键值对作为内存,并行运行,达到了新的技术水平。可用于建模问题用上下文(或历史)回答。例如,您可以让模型阅读一些句子(作为上下文),并询问提问(作为查询),然后要求模型预测答案;如果您提供的故事与查询相同,那么它可以做到分类任务。
获取模型代码
关注微信公众号 datayx 然后回复文本分类即可获取。
Models:
fastText
TextCNN
Bert:Pre-training of Deep Bidirectional Transformers for Language Understanding
TextRNN
RCNN
Hierarchical Attention Network
seq2seq with attention
Transformer("Attend Is All You Need")
Dynamic Memory Network
EntityNetwork:tracking state of the world
Ensemble models
Boosting:
for a single model, stack identical models together. each layer is a model. the result will be based on logits added together. the only connection between layers are label's weights. the front layer's prediction error rate of each label will become weight for the next layers. those labels with high error rate will have big weight. so later layer's will pay more attention to those mis-predicted labels, and try to fix previous mistake of former layer. as a result, we will get a much strong model. check a00_boosting/boosting.py
and other models:
BiLstmTextRelation;
twoCNNTextRelation;
BiLstmTextRelationTwoRNN
AI项目体验地址 https://loveai.tech
阅读过本文的人还看了以下:
不断更新资源
深度学习、机器学习、数据分析、python
搜索公众号添加:datayx
长按图片,识别二维码,点关注
AI项目体验
https://loveai.tech