Giter Site home page Giter Site logo

nnclf's Introduction

注意

该项目不再更新,请转到 clfzoo

PyTorch

nnclf

分本分类的方法有很多种,而且传统的机器学习方法就能有很好的效果, 神经网络的话在小数据量下是体现不出效果的,而且神经网络训练周期长。 分享这个项目就当作加深对卷积神经网络CNN以及递归神经网络RNN的理解吧。

那么本项目主要有哪些亮点呢?

1. 支持batch_size,短文本一般长度不一,所以用PyTorch的话一般得要自己封装好输入向量
看PyTorch文档时是不是在LSTM,GRU...这些地方会看到pack_padded_sequence(), pad_packed_sequence()呢?
在这里就可以用到了
2. 支持word2vec训练后的词向量表代替Embedding的权值。是不是有很多地方都说使用预训练的词向量效果会好?那究竟怎么用呢?
在这里就可以用到了

以上两点我都做了封装,看代码应该可以能理解,使用方法

运行环境

  • Centos7 当然其他linux, mac都可以,只要支持PyTorch的系统都可以,不过不支持windows
  • python3.6
  • PyTorch V0.2 记得更新一下PyTorch,因为用到了lr_scheduler,新版才有

知识储备

联系我

  • 邮件(xmlee97#gmail.com, 把#换成@)
  • weibo: @捏明

项目链接

SVM, FastText, TextCNN, BiGRU, CNN-BiGRU在短文本分类上的对比

nnclf's People

Contributors

seanlee97 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.