Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dalinvip/cnn-lstm-bilstm-deepcnn-clstm-in-pytorch
In PyTorch Learing Neural Networks Likes CNN、BiLSTM
https://github.com/dalinvip/cnn-lstm-bilstm-deepcnn-clstm-in-pytorch
cnn-bilstm cnn-model gru highway-cnn lstm-model model-bilstm pytorch torchtext
Last synced: 6 days ago
JSON representation
In PyTorch Learing Neural Networks Likes CNN、BiLSTM
- Host: GitHub
- URL: https://github.com/dalinvip/cnn-lstm-bilstm-deepcnn-clstm-in-pytorch
- Owner: dalinvip
- License: apache-2.0
- Created: 2017-07-28T11:45:58.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-20T02:58:24.000Z (almost 2 years ago)
- Last Synced: 2025-01-19T09:03:18.903Z (13 days ago)
- Topics: cnn-bilstm, cnn-model, gru, highway-cnn, lstm-model, model-bilstm, pytorch, torchtext
- Language: Python
- Homepage:
- Size: 24.6 MB
- Stars: 1,297
- Watchers: 23
- Forks: 344
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Introduction ##
- A classification task implement in pytorch, contains some neural networks in [models](https://github.com/bamtercelboo/cnn-lstm-bilstm-deepcnn-clstm-in-pytorch/tree/master/models).
* Recenely, I've released the code.
* **old-version-17** release [here](https://github.com/bamtercelboo/cnn-lstm-bilstm-deepcnn-clstm-in-pytorch/releases/tag/pytorch0.3.1-old_version_17)
* **pytorch version == 0.3.1** release on [here](https://github.com/bamtercelboo/cnn-lstm-bilstm-deepcnn-clstm-in-pytorch/releases/tag/pytorch0.3.1)- This is a version of my own architecture --- [pytorch-text-classification](https://github.com/bamtercelboo/pytorch_text_classification)
- **BERT For Text Classification** --- [PyTorch_Bert_Text_Classification](https://github.com/bamtercelboo/PyTorch_Bert_Text_Classification)
## Requirement ##
pyorch : 1.0.1
python : 3.6
torchtext: 0.2.1
cuda : 8.0 (support cuda speed up, can chose, default True)## Usage ##
modify the config file, see the Config directory([here](https://github.com/bamtercelboo/cnn-lstm-bilstm-deepcnn-clstm-in-pytorch/tree/master/Config)) for detail.1、python main.py
2、python main.py --config_file ./Config/config.cfg
3、sh run.sh## Model ##
Contains some neural networks implement in pytorch, see the [models](https://github.com/bamtercelboo/cnn-lstm-bilstm-deepcnn-clstm-in-pytorch/tree/master/models) for detail.
## Data ##
SST-1 and SST-2.
## Result ##
I haven't adjusted the hyper-parameters seriously, you can also see train log in [here](https://github.com/bamtercelboo/cnn-lstm-bilstm-deepcnn-clstm-in-pytorch/tree/master/result).
The following test set accuracy are based on the best dev set accuracy.
| Data/Model | % SST-1 | % SST-2 |
| ------------ | ------------ | ------------ |
| CNN | 46.1086 | 84.2943 |
| Bi-LSTM | 47.9186 | 86.3262 |
| Bi-GRU | 47.6923 | 86.7655 |## Reference ##
- [基于pytorch的CNN-LSTM神经网络模型调参小结](http://www.cnblogs.com/bamtercelboo/p/7469005.html "基于pytorch的CNN-LSTM神经网络模型调参小结")
- [Convolutional Neural Networks for Sentence Classification](https://arxiv.org/pdf/1408.5882.pdf)
- [Context-Sensitive Lexicon Features for Neural Sentiment Analysis](https://arxiv.org/pdf/1408.5882.pdf)