Coder Social home page Coder Social logo

few-shot-ood's Introduction

Out-of-domain Prototypical Networks

Code and Amazon Data for the EMNLP 2019 paper: [Out-of-Domain Detection for Low-Resource Text Classification Tasks] The experiments were conducted on Python 3.6 and Tensorflow 1.8.

Amazon_few_shot

The few-shot learning dataset with out-of-domain testing examples (generated from Amazon review) is in data directory, including META-TRAIN, META-DEV and META-TEST.

Data preparation

  1. Update the config/config file by assigning the corresponding folder and dataset lists.
  2. In our paper, we use word embeddings, trained from Wikipedia (about 1G tokens). We cannot release it. You can use a publicly-available English word embeddings, like Glove (100 dimensions). You need to add two extra tokens at the beginning, </s> for padding and <unk> for unknown words. They can be initialized with zero vectors. The format of word embeddings is <token> \t <num_1>...<num_100>.

How to run the code

bash run.sh

The output will be, for example: Average EER, CER, COMBINED_CER on Meta-Test: 0.233 0.303 0.405

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.