Giter Site home page Giter Site logo

deepmistake's Introduction

mcl-wic

To install dependencies:

pip install -r requirements.txt

To prepare dataset:

python prepare_dataset.py

To train the model:

python run_model.py --do_train --do_validation --data_dir data/wic/ --output_dir MODEL_OUT_DIR

To predict the test set:

python run_model.py --do_eval --data_dir data/wic/ --ckpt_path CKPT_PATH --eval_input_dir EVAL_INP_DIR --eval_output_dir EVAL_OUT_DIR

To run grid searh:

for lr in 1e-5 2e-5 5e-6;
do
    for loss in mse_loss crossentropy_loss;
    do
        for pool in max first;
        do
            for symmetric in true false;
            do
                for lr_s in linear_warmup constant_warmup;
                do
                    OUT_DIR=trained_models/lr-$lr-loss-$loss-pool-$pool-symmetric-$symmetric-lrs-${lr_s}/
                    echo python run_model.py --do_train --do_validation \
                        --data_dir data/wic/ --output_dir $OUT_DIR \
                        --learning_rate $lr \
                        --loss $loss \
                        --pool_type $pool \
                        --symmetric $symmetric \
                        --lr_scheduler $lr_s \
                        --num_train_epochs 50 \
                        --start_save_threshold 0.7 \
                        --gradient_accumulation_steps 16;
                done
            done
        done
    done
done

To run predictions on test set:

for lr in 1e-5 2e-5 5e-6;
do
    for loss in mse_loss crossentropy_loss;
    do
        for pool in max first;
        do
            for symmetric in true false;
            do
                for lr_s in linear_warmup constant_warmup;
                do
                    OUT_DIR=trained_models/lr-$lr-loss-$loss-pool-$pool-symmetric-$symmetric-lrs-${lr_s}/
                    python run_model.py --do_eval \
                        --data_dir data/wic/ --output_dir $OUT_DIR \
                        --learning_rate $lr \
                        --loss $loss \
                        --pool_type $pool \
                        --symmetric $symmetric \
                        --ckpt_path $OUT_DIR \
                        --eval_input_dir data/wic/test/ \
                        --eval_output_dir best_test_eval_predictions;
                done
            done
        done
    done
done

deepmistake's People

Contributors

daniil153 avatar nvanva avatar ameta13 avatar davletov-aa avatar syavaprd avatar

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.