Git Product home page Git Product logo

dair-iitd / poolinganalysis Goto Github PK

View Code? Open in Web Editor NEW
7.0 6.0 1.0 20 KB

[EMNLP'20][Findings] Official Repository for the paper "Why and when should you pool? Analyzing Pooling in Recurrent Architectures."

Home Page: https://pratyushmaini.github.io/Pooling-Analysis

Python 100.00%
recurrent-architectures analyzing-pooling lstm sentiment-classification emnlp2020 vanishing-gradient positional-bias

poolinganalysis's Introduction

Analyzing Pooling in Recurrent Architectures

Repository for the paper Analyzing Pooling in Recurrent Architectures by Pratyush Maini, Kolluru Sai Keshav, Danish Pruthi and Mausam

Dependencies

The code requires the following dependencies to run can be installed using the conda environment file provided:

conda env create --file environment.yaml

Running gradients experiments

Evaluate the Initial gradient distribution

python train.py --pool att_max --data_size 20K --gpu_id 0 --mode train --batch_size 1 --task IMDB_LONG --wiki none --epochs 5 --gradients 1 --initial 1 --log 1 --customlstm 1

Results are at model_dir/initial_gradients.txt

Vanishing Ratios

python train.py --pool att_max --data_size 20K --gpu_id 0 --mode train --batch_size 32 --task IMDB_LONG --wiki none --epochs 5 --gradients 1 --ratios 1 --log 1 --customlstm 1

Results are at model_dir/ratios.txt

Train a model in the Wiki setting

python train.py --pool att_max --data_size 20K --gpu_id 0 --mode train --batch_size 32 --task IMDB_LONG --wiki mid --epochs 20 --log 1 --customlstm 0

Logs are at model_dir/logs.txt

Bias Evaluation

Change the test time distribution

python test.py --pool att_max --data_size 20K --gpu_id 0 --mode test --batch_size 32 --task IMDB_LONG --wiki none --vec 3 --customlstm 0

Get the NWI scores

python test.py --pool att_max --data_size 20K --gpu_id 0 --mode test --batch_size 32 --task IMDB_LONG --wiki none --NWI 1 --customlstm 0

How can I cite this work?

@inproceedings{maini2020pool,
    title = "Why and when should you pool? Analyzing Pooling in Recurrent Architectures",
    author = "Maini, Pratyush and Kolluru, Keshav and Pruthi, Danish and {Mausam}",
    booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2020",
    year = "2020",
    address = "Online",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/2020.findings-emnlp.410",
}

poolinganalysis's People

Contributors

pratyushmaini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

poolinganalysis's Issues

FileNotFoundError

Thank you very much for this excellent work!Congratulations!When I run train.py, I get FileNotFoundError: [Errno 2] No such file or directory:'../data/IMDB_LONG/dump_none.pkl'
I don't find the 'IMDB_LONG/dump_none.pkl'. Can you provide the IMDB_LONG/dump_none.pkl'?
Thank you for your help.

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.