Skip to content

dalinvip/cnn-lstm-bilstm-deepcnn-clstm-in-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

afbbc4d · Mar 20, 2023

History

88 Commits
Feb 20, 2019
Jul 20, 2018
Mar 20, 2023
Jul 21, 2018
Jul 21, 2018
Feb 20, 2019
Aug 5, 2018
Jul 20, 2018
Jul 20, 2018
Mar 20, 2023
Jul 20, 2018
Apr 23, 2019
Feb 20, 2019
Feb 20, 2019
Feb 20, 2019

Repository files navigation

Introduction

  • A classification task implement in pytorch, contains some neural networks in models.
  • Recenely, I've released the code.
    • old-version-17 release here
    • pytorch version == 0.3.1 release on here

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) 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 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.

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