Giter Club home page Giter Club logo

nlp_newsclassifier's Introduction

NLP_NewsClassifier

模型设计

avatar

  1. EMB:嵌入层,将输入的sentence转化为vector
  2. LSTM:为了解决长序列训练过程中的梯度消失和梯度爆炸问题,采用三层LSTM网络
  3. Attention层:为进一步解决长连接问题,引入Attention
  4. 全连接层:第一层维度为 200 * 50,第二层维度为 50 * 15

实验结果

起初,我们设置学习率lr为0.005,可见loss忽高忽低,lr设置的过大,且f1值较低,考虑可能是欠拟合。

avatar

改进方式:设置学习率为0.002,LSTM层数增至3层(第一次为1层)

avatar

改进后,经过5轮,fi值提升至60%以上,虽然之后loss仍在下降,但是f1值未变,存在过拟合现象。

测试样例:

avatar

官方测试结果

avatar

代码说明文档

说明文档.md

nlp_newsclassifier's People

Contributors

outcast96 avatar

Watchers

James Cloos avatar  avatar

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.