Giter Club home page Giter Club logo

adl22-hw1's Introduction

Homework 1 ADL NTU

Environment

# If you have conda, we recommend you to build a conda environment called "adl-hw1"
make
conda activate adl-hw1
pip install -r requirements.txt
# Otherwise
pip install -r requirements.in

Preprocessing

# To preprocess intent detectiona and slot tagging datasets
bash preprocess.sh

Intent detection

# training
python train_intent.py \
    --max_len 128 \
    --model_type "GRU" \
    --dropout 0.3 \
    --lr 1e-3 \
    --L2 3e-4 \
    --batch_size 512 \
    --device "cuda" \
    --num_epoch 50
# testing if gpu is available
bash intent_cls.sh /path/to/test.json /path/to/pred.csv

Slot tagging

# training
python train_slot.py \
    --max_len 128 \
    --model_type "LSTM" \
    --L2 1e-4 \
    --device "cuda" \
    --num_epoch 50
# testing if gpu is available
bash slot_tag.sh /path/to/test.json /path/to/pred.csv

adl22-hw1's People

Contributors

adamlin120 avatar hanyikao avatar

Watchers

 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.