Code Monkey home page Code Monkey logo

nnclassifymodels's Introduction

NLP 分类

1. 模型概览

models tensorflow pytorch
fastText Yes Yes
TextCNN Yes Yes
TextRNN Yes Yes
TextRCNN Yes False

2. 数据集及数据处理

  • 数据: IMDB
  • 数据分割:
train_size test_size
1w 1w
2w 1w
3w 1w
4w 1w

3. tensorflow实验记录

  • ** fastText模型 **
训练数据大小 batch_size loss acc 运行时间
2.5w 128 0.717 0.839 -
  • ** TextCNN模型 **
训练数据大小 batch_size loss acc 运行时间
2.5w 128 0.537 0.878 -
  • ** TextRNN模型 ** 过拟合: Train Loss:0.184 Train Accuracy:0.932
训练数据大小 batch_size loss acc 运行时间
2.5w 128 0.417 0.843 -

dropout=0.5: 过拟合效果降低,准确率也有所降低 epoch=5: Train Loss:0.303 Train Accuracy:0.883 Validation Loss:0.425 Validation Accuracy: 0.824

  • ** TextRCNN模型 **
  • BiRNN 不建议考虑该模型
训练数据大小 batch_size loss acc 运行时间
2.5w 128 0.444 0.879 -

4. pytorch实验记录

  • ** fastText模型 **
训练数据大小 batch_size loss acc 运行时间
2.5w 128 0.07620274275541306 0.85 -
  • ** TextCNN模型 **
训练数据大小 batch_size loss acc 运行时间
2.5w 50 0.0011307994136586785 0.8 -
  • ** TextRNN模型 **
训练数据大小 batch_size loss acc 运行时间
2.5w 400 - - -

5. 模型保存

只保存当前val_acc高于历史最佳acc的模型数据,包含模型权重、图等

TODO: 3. 只跑GPU 4. tensorflow 部分对预训练向量处理 5. pytorch张量改为GPU张量,tensorflow也需要做相应处理

nnclassifymodels's People

Contributors

liruishaer avatar

Watchers

 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.