* Add MP-CNN Lite model * MP-CNN Lite bug fixes
Castor
This is the common repo for PyTorch deep learning models by the Data Systems Group at the University of Waterloo.
Models
Predictions Over One Input Sequence
For sentiment analysis, topic classification, etc.
- Kim CNN: baseline convolutional neural network for sentence classification (Kim, EMNLP 2014)
- conv-RNN: convolutional RNN (Wang et al., KDD 2017)
Predictions Over Two Input Sequences
For paraphrase detection, question answering, etc.
- SM-CNN: Siamese CNN for ranking texts (Severyn and Moschitti, SIGIR 2015)
- MP-CNN: Multi-Perspective CNN (He et al., EMNLP 2015)
- NCE: Noise-Contrastive Estimation for answer selection applied on SM-CNN and MP-CNN
- IDF Baseline: IDF overlap between question and candidate answers
Setting up PyTorch
Copy and run the command at https://pytorch.org/ for your environment. PyTorch recommends the Anaconda environment, which we use in our lab.
The typical installation command is
conda install pytorch torchvision -c pytorch
Data and Pre-Trained Models
Data associated for use with this repository can be found at: https://git.uwaterloo.ca/jimmylin/Castor-data.git.
Pre-trained models can be found at: https://github.com/castorini/models.git.
Your directory structure should look like
.
├── Castor
├── Castor-data
└── models
For example (if you use HTTPS instead of SSH):
git clone https://github.com/castorini/Castor.git
git clone https://git.uwaterloo.ca/jimmylin/Castor-data.git
git clone https://github.com/castorini/models.git
Sourcing and pre-processing of input data for each model is described in the respective model/README.md's.