Code Monkey home page Code Monkey logo

text-classification's Introduction

text-classification

Simplified models for text classification by tensorflow.

TextCNN

Requirements

  • tensorflow version-1.6.0
  • nltk version-3.3
  • wget version-3.2
  • tqdm version-4.24

Dataset

DBpedia:The DBpedia ontology classification dataset is constructed by picking 14 non-overlapping classes from DBpedia 2014. From each of thse 14 ontology classes, we randomly choose 40,000 training samples and 5,000 testing samples. Therefore, the total size of the training dataset is 560,000 and testing dataset 70,000.

Training

The model was trained with NVidia 1080Ti, The model requires at least 12GB of GPU RAM. If your GPU RAM is smaller than 12GB, you can either decrease batch size.

python train.py --sentence_len 30 --batch_size 60

Test

python test.py --sentence_len 30 --batch_size 1000

Result

version train_acc test_acc
v1 90.4% 87.8%
  • v1: sentence_len:30, filter_size:[3,4,5], batch_size:60, no batch_norm
  • v2: sentence_len:30, filter_size:[3,4,5], batch_size:60, with batch_norm

text-classification's People

Contributors

panxiebit avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

trellixvulnteam

text-classification's Issues

example data sets ?

Is there a chance you push also some example data files to train and process ?

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.