Giter VIP home page Giter VIP logo

cnn-text-classifier's Introduction

CNN Text Classifier

This application is built by replicating work done in this paper here.

Dependencies

  1. Tensorflow
  2. Keras (Well, I wanted to avoid it entirely but had to use it for some data preprocessing :P)
  3. Matplotlib
  4. NumPy

Usage

usage: train.py [-h] [--src SRC] [--e_src E_SRC] [--ckpt_path CKPT_PATH]
                [--s_len S_LEN] [--dim DIM] [--nb_words NB_WORDS]
                [--model_type MODEL_TYPE] [-h_file H_FILE]

optional arguments:
  -h, --help            show this help message and exit
  --src SRC             Path to directory containing text file and label file
                        dataset. Default - './datasets/'
  --e_src E_SRC         File containing embedding vectors. Default -
                        './embeddings/e_vectors.txt'
  --ckpt_path CKPT_PATH
                        Path to directory where the checkpoint of the model
                        should be stored. If the directory doesn't exist, it
                        will be created. Default - './checkpoint/'
  --s_len S_LEN         Maximum length of the input sequence. Default - 64
  --dim DIM             Dimensions of the embedding vector space to be
                        utilized. Default - 100
  --nb_words NB_WORDS   Numbers of words to keep from the dataset.
  --model_type MODEL_TYPE
                        Name of the model.Possible values - 'rand', 'static',
                        'non-static'Check CNN sentence classifier paper here
                        for details -> https://arxiv.org/abs/1408.5882.
                        Default - 'rand'
  -h_file H_FILE        In case of default model type a tunning_params.txt
                        file is required. The file should contain
                        hyperparameters in following order each on new line.
                        Learning Rate, Num Epochs, Mini-batch size, Device -
                        CPU/GPU. Default - 0.001, 10, 32, GPU.

Model

cnn-text-classifier's People

Contributors

piyush2896 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

shubpy iceriverg

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.