GithubHelp home page GithubHelp logo

firashm / gair-slu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from billkiller/gair-slu

0.0 0.0 0.0 692 KB

A Graph Attention Interactive Refine framework with contextual regularization for jointing intent detection and slot filling

Python 100.00%

gair-slu's Introduction

GAIR: A Graph Attention Interactive Refine framework with contextual regularization for jointing intent detection and slot filling

Our code is based on StackPropagation. Besides, we use StackPropagation Model as the stage one model, and refine the result by the graph attention interactive refine framework with contextual regularization.

In the following, we will guide you how to use this repository step by step.

Architecture

Preparation

Our code is based on PyTorch 1.1 and runnable for both windows and ubuntu server. Required python packages:

  • numpy==1.21.5
  • tqdm==4.32.2
  • scipy==1.2.1
  • torch==1.8.1
  • ordered-set==4.0.2
  • transformers == 4.15.0
  • fastnlp==0.7.0

We highly suggest you using Anaconda to manage your python environment.

How to Train it

The script train.py acts as a main function to the project. For reproducing the results reported in our paper, We suggest you the following hyper-parameter setting for CAIS dataset:

    python train.py -wed 64 -ehd 256 -aod 128 -dd=data/cais/  --topk 3

Similarly, for SMP dataset, you can also consider the following command:

    python train.py -wed 256 -ehd 256 -aod 128  -dd=data/smp/ --topk 3 

How to Test it

To test model on CAIS or SMP dataset: python train.py -dd=data/smp_or_cais/ --mode test -sd=model_save_path --topk 3

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.