All Projects → galsang → Cnn Sentence Classification Pytorch

galsang / Cnn Sentence Classification Pytorch

Implementation of Convolutional Neural Networks for Sentence Classification (Y.Kim, EMNLP 2014) on Pytorch.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Cnn Sentence Classification Pytorch

Ti Pooling
TI-pooling: transformation-invariant pooling for feature learning in Convolutional Neural Networks
Stars: ✭ 119 (-9.16%)
Mutual labels:  convolutional-neural-networks
Aaltd18
Data augmentation using synthetic data for time series classification with deep residual networks
Stars: ✭ 124 (-5.34%)
Mutual labels:  convolutional-neural-networks
Rcnn Text Classification
Tensorflow Implementation of "Recurrent Convolutional Neural Network for Text Classification" (AAAI 2015)
Stars: ✭ 127 (-3.05%)
Mutual labels:  convolutional-neural-networks
Keras transfer cifar10
Object classification with CIFAR-10 using transfer learning
Stars: ✭ 120 (-8.4%)
Mutual labels:  convolutional-neural-networks
Hyperdensenet
This repository contains the code of HyperDenseNet, a hyper-densely connected CNN to segment medical images in multi-modal image scenarios.
Stars: ✭ 124 (-5.34%)
Mutual labels:  convolutional-neural-networks
Motionblur Detection By Cnn
Stars: ✭ 126 (-3.82%)
Mutual labels:  convolutional-neural-networks
Convncf
Experimental codes for paper "Outer Product-based Neural Collaborative Filtering".
Stars: ✭ 118 (-9.92%)
Mutual labels:  convolutional-neural-networks
Image Caption Generator
A neural network to generate captions for an image using CNN and RNN with BEAM Search.
Stars: ✭ 126 (-3.82%)
Mutual labels:  convolutional-neural-networks
Deepecg
ECG classification programs based on ML/DL methods
Stars: ✭ 124 (-5.34%)
Mutual labels:  convolutional-neural-networks
Deepco3
[CVPR19] DeepCO3: Deep Instance Co-segmentation by Co-peak Search and Co-saliency (Oral paper)
Stars: ✭ 127 (-3.05%)
Mutual labels:  convolutional-neural-networks
Drln
Densely Residual Laplacian Super-resolution, IEEE Pattern Analysis and Machine Intelligence (TPAMI), 2020
Stars: ✭ 120 (-8.4%)
Mutual labels:  convolutional-neural-networks
Lenet 5
PyTorch implementation of LeNet-5 with live visualization
Stars: ✭ 122 (-6.87%)
Mutual labels:  convolutional-neural-networks
Jsnet
Javascript/WebAssembly deep learning library for MLPs and convolutional neural networks
Stars: ✭ 126 (-3.82%)
Mutual labels:  convolutional-neural-networks
Context
ConText v4: Neural networks for text categorization
Stars: ✭ 120 (-8.4%)
Mutual labels:  convolutional-neural-networks
Sparsenet
[ECCV 2018] Sparsely Aggreagated Convolutional Networks https://arxiv.org/abs/1801.05895
Stars: ✭ 127 (-3.05%)
Mutual labels:  convolutional-neural-networks
Food101 Coreml
A CoreML model which classifies images of food
Stars: ✭ 119 (-9.16%)
Mutual labels:  convolutional-neural-networks
Quiver
Interactive convnet features visualization for Keras
Stars: ✭ 1,619 (+1135.88%)
Mutual labels:  convolutional-neural-networks
Pytorch Vfi Cft
Generate slow-motion videos by interpolating more frames
Stars: ✭ 130 (-0.76%)
Mutual labels:  convolutional-neural-networks
Handwritten Digit Recognition Using Deep Learning
Handwritten Digit Recognition using Machine Learning and Deep Learning
Stars: ✭ 127 (-3.05%)
Mutual labels:  convolutional-neural-networks
Pytorch convlstm
convolutional lstm implementation in pytorch
Stars: ✭ 126 (-3.82%)
Mutual labels:  convolutional-neural-networks

Convolutional Neural Networks for Sentence Classification

This is the implementation of Convolutional Neural Networks for Sentence Classification (Y.Kim, EMNLP 2014) on Pytorch.

Results

Below are results corresponding to all 4 models proposed in the paper for each dataset. Experiments have been done with a learning rate = 0.1 1 up to 300 100 epochs and all details are tuned to follow the settings defined in the paper.

(17.02.06) There was a bug that the best model is selected based on test acc, not on dev acc. The error has been corrected and so do results. Also note that the results can be somewhat different whenever the code is executed. Thanks! (WARNING: CV should be performed in case of MR, but only the random selection of dev(10%) and test(10%) set is done for simplicity.)

(Measure: Accuracy)

Model Dataset MR TREC
Rand Results 67.7 88.2
Baseline 76.1 91.2
Static Results 79.7 93.2
Baseline 81.0 92.8
Non-static Results 80.1 94.4
Baseline 81.5 93.6
Multichannel Results 79.8 93.6
Baseline 81.1 92.2

Specification

  • model.py: CNN sentnece classifier implementation proposed by Y. Kim.
  • run.py: train and test a model with configs.

Development Environment

  • OS: Ubuntu 16.04 LTS (64bit)
  • Language: Python 3.6.2.
  • GPU: GTX 1080

Requirements

This model is based on pre-trained Word2vec(GoogleNews-vectors-negative300.bin) by T.Mikolov et al. You should download this file and place it in the root folder.

Also you should follow library requirements specified in the requirements.txt.

numpy==1.12.1
gensim==2.3.0
scikit_learn==0.19.0

Execution

python run.py --help

usage: run.py [-h] [--mode MODE] [--model MODEL] [--dataset DATASET]
			  [--save_model] [--early_stopping] [--epoch EPOCH]
			  [--learning_rate LEARNING_RATE] [--gpu GPU]

-----[CNN-classifier]-----

optional arguments:
  -h, --help            show this help message and exit
  --mode MODE           train: train (with test) a model / test: test saved
						models
  --model MODEL         available models: rand, static, non-static,
						multichannel
  --dataset DATASET     available datasets: MR, TREC
  --save_model          whether saving model or not
  --early_stopping      whether to apply early stopping
  --epoch EPOCH         number of max epoch
  --learning_rate LEARNING_RATE
						learning rate
  --gpu GPU             the number of gpu to be used
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].