Giter Site home page Giter Site logo

freedomintelligence / textclassificationbenchmark Goto Github PK

View Code? Open in Web Editor NEW
593.0 32.0 137.0 1.8 MB

A Benchmark of Text Classification in PyTorch

License: MIT License

Python 99.74% Shell 0.26%
text-classification benchmark lstm pytorch capusle cnn cnn-classification lstm-sentiment-analysis attention-is-all-you-need rcnn

textclassificationbenchmark's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

textclassificationbenchmark's Issues

I am so sad it's not use straight.

we I want use trec dataset to test ,it cant run ,and dataSet file cant find i have to said,it NOT friendly to me.I just want quickly iterator,IT waste my time.

Difference performance between the following results

Windows/Pytorch 0.3/Python3
linux/pytorch 0.2/Python2
Results on windows:
0 ieration 0 epoch with loss : 1.11731
0 ieration 100 epoch with loss : 0.95308
0 ieration 200 epoch with loss : 0.50708
0 ieration 300 epoch with loss : 0.75614
0 ieration with percision 0.8398
1 ieration 0 epoch with loss : 0.16429
1 ieration 100 epoch with loss : 0.10894
1 ieration 200 epoch with loss : 0.05845
1 ieration 300 epoch with loss : 0.34559
1 ieration with percision 0.8438
2 ieration 0 epoch with loss : 0.09230
2 ieration 100 epoch with loss : 0.01140
2 ieration 200 epoch with loss : 0.23463
2 ieration 300 epoch with loss : 0.00004
2 ieration with percision 0.8346
3 ieration 0 epoch with loss : 0.05743
3 ieration 100 epoch with loss : 0.40399
3 ieration 200 epoch with loss : 0.01134
3 ieration 300 epoch with loss : 0.30481
3 ieration with percision 0.8086
4 ieration 0 epoch with loss : 0.03121
4 ieration 100 epoch with loss : 0.00000
4 ieration 200 epoch with loss : 0.36847
4 ieration 300 epoch with loss : 0.07362
4 ieration with percision 0.7786
5 ieration 0 epoch with loss : 0.10139
5 ieration 100 epoch with loss : 0.02151
5 ieration 200 epoch with loss : 0.00000
5 ieration 300 epoch with loss : 0.00000
5 ieration with percision 0.8099

Linux results:
0 ieration 0 epoch with loss : 1.09381
0 ieration 100 epoch with loss : 0.69792
0 ieration 200 epoch with loss : 0.69200
0 ieration 300 epoch with loss : 0.67666
0 ieration with percision 0.6022
1 ieration 0 epoch with loss : 0.66189
1 ieration 100 epoch with loss : 0.61229
1 ieration 200 epoch with loss : 0.50442
1 ieration 300 epoch with loss : 0.48552
1 ieration with percision 0.7489
2 ieration 0 epoch with loss : 0.24260
2 ieration 100 epoch with loss : 0.14823
2 ieration 200 epoch with loss : 0.22468
2 ieration 300 epoch with loss : 0.27329
2 ieration with percision 0.6626
3 ieration 0 epoch with loss : 0.06171
3 ieration 100 epoch with loss : 0.05115
3 ieration 200 epoch with loss : 0.04176
3 ieration 300 epoch with loss : 0.03525
3 ieration with percision 0.6915
4 ieration 0 epoch with loss : 0.01683
4 ieration 100 epoch with loss : 0.01829
4 ieration 200 epoch with loss : 0.00905
4 ieration 300 epoch with loss : 0.02068
4 ieration with percision 0.6919
5 ieration 0 epoch with loss : 0.00466
5 ieration 100 epoch with loss : 0.00262
5 ieration 200 epoch with loss : 0.00331
5 ieration 300 epoch with loss : 0.00265
5 ieration with percision 0.6734
6 ieration 0 epoch with loss : 0.00100
6 ieration 100 epoch with loss : 0.00166
6 ieration 200 epoch with loss : 0.02555
6 ieration 300 epoch with loss : 0.00685
6 ieration with percision 0.6747
7 ieration 0 epoch with loss : 0.00118
7 ieration 100 epoch with loss : 0.00065
7 ieration 200 epoch with loss : 0.00031
7 ieration 300 epoch with loss : 0.00016
7 ieration with percision 0.6703
8 ieration 0 epoch with loss : 0.00030
8 ieration 100 epoch with loss : 0.00029
8 ieration 200 epoch with loss : 0.00029
8 ieration 300 epoch with loss : 0.00006
8 ieration with percision 0.6694
9 ieration 0 epoch with loss : 0.00016
9 ieration 100 epoch with loss : 0.00093
9 ieration 200 epoch with loss : 0.00020
9 ieration 300 epoch with loss :

Saving and Loading saved models gives different results

Hi,
There is a serious problem in the current codebase. If you save a model then reload it in a DIFFERENT time (not the same execution of main.py) the accuracy is 50% on IMDB. As a sanity check if you save and reload in the execution of main.py then there is no problem. If I had to guess this is a dataloading problem where there is a mistmatch between the saved model and the newly loaded model in a second execution.

Benchmark results in README

Hi, would it be possible for the authors to add the accuracy results that they're getting to the README? Right now I'm seeing numbers which are mid 80's for certain models when I know certain people have reported 89/90 with Deep Learning methods on IMDB.

Add BERT benchmarks

Thanks for this repo. It could be very interesting to add the latest Google's BERT model that claims to be state-of-the-art in recent NLP tasks among them text classification. They have a classifier implementation to adapt, here some details.

Automatically download embeddings

Hi,

thanks creating this text classification benchmark!

I wanted to run the basic example python3 main.py --model cnn and I could see that the GloVe embeddings were not downloaded automatically.

The dataHelper.loadData(opt) never calls the Glove constructor, so the embeddings won't be downloaded. But when I change from_torchtext = False to from_torchtext = True the utils.loadData(opt) method calls the Glove constructor.

I guess calling the Glove constructor would be enough to call it before the glove_file declaration (from here)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.