Giter VIP home page Giter VIP logo

todkat's Introduction

TodKat

Transformer encoder-decoder for emotion detection in dialogues

Quick Start:


To run the model on test sets of four datasets,

  1. Download the pre-trained models save.zip , unzip the zip file to ./TodKat/save
  2. Locate to the ./TodKat/src and execute the following command in terminal: python TodKat_dd.py for DailyDialogue. python TodKat_emory.py for EmoryNLP. python TodKat_iemocap.py for IEMOCAP. python TodKat_meld.py for MELD.

Bug fix: the sklearn was used erroneously, causing the unusual high macro-F1 of MELD. A hot fix is provided. Below lists the updated performance:

MELD
avg-macro-F1 micro-F1
0.6547 0.6724

To validate, simply download the saved model and run the code.

Here comes the detailed instructions on how to perform training, testing and prediction.

Required Packages:


torch==1.7.0 transformers==4.0.0 csv typing numpy tqdm pandas ipython ftfy==5.1

Run on GPU:


Model runs on GPU by default with cuda:0. Please change device if going to train on CPU. Saved models are trained with cuda:0, change the configurations in the saved model if you want to run them on another device.

Training:


Uncomment TodKat_dd line 613 - line 705 to train model on DailyDialog. Uncomment TodKat_emory line 613 - line 705 to train model on EmoryNLP. Uncomment TodKat_iemocap line 614 - line 708 to train model on IEMOCAP. Uncomment TodKat_meld line 614 - line 708 to train model on MELD.

Evaluation:


Comment TodKat_dd line 613 - line 705 and uncomment line 707 - 738 on DailyDialog. Comment TodKat_emory line 613 - line 705 and uncomment line 707 - 744 on EmoryNLP. Comment TodKat_iemocap line 614 - line 708 and uncomment line 710 - 741 on IEMOCAP. Comment TodKat_meld line 614 - line 708 and uncomment line 710 - 742 on MELD.

Prediction:


Comment TodKat_dd line 613 - line 705 and uncomment line 707 - 742 on DailyDialog. Comment TodKat_emory line 613 - line 705 and uncomment line 707 - 748 on EmoryNLP. Comment TodKat_iemocap line 614 - line 708 and uncomment line 710 - 745 on IEMOCAP. Comment TodKat_meld line 614 - line 708 and uncomment line 710 - 746 on MELD.

todkat's People

Contributors

something678 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.