1-D CNN for sentence classification TEST
Pipenv
pipenv install
pipenv shell
Download dataset : Movie Review(MR) and word vector :fastText
sh script/MR_download.sh
sh script/fasttext_download.sh
Model architecture
Running
python main.py --model CNN-rand
CNN-randinitializes the word embeddings randomly and learns them.CNN-staticinitializes the word embeddings to word2vec and keeps the weight static.CNN-nonstaticalso initializes to word2vec, but allows them to be learned.
Result
| model | ACC |
|---|---|
| CNN-rand | 72.75 |
| CNN-static | 83.47 |
| CNN-non-static | 83.74 |
refernce:
A Complete Guide to CNN for Sentence Classification with PyTorch
