GithubHelp home page GithubHelp logo

knncontrastiveforood's Introduction

Source code for 'KNN-Contrastive Learning for Out-of-Domain Intent Classofication'.

Dependencies

Use anaconda to create python environemnt:

[conda create --name python=3.6.12]

Install all required libraries:

[pip install -r requirements.txt]

Usage:

Run the experiments (for example banking_25):

[python run_main.py json/banking_25.json]

Results:

[Results stored in model_output, e.g. banaking_0.25.csv]

knncontrastiveforood's People

Contributors

zyh190507 avatar

Stargazers

TIANYUZHOU avatar Abdullah Mohammed A Alsuhaibani avatar Dave avatar  avatar  avatar  avatar Seongeun Hong avatar Haonan Qin avatar Men Tianyi avatar YJ avatar  avatar  avatar Takuya Makino avatar  avatar Ong Seong Wu avatar Haonan Lin avatar  avatar  avatar DevRoss avatar  avatar Zeyang Peng avatar  avatar gaojingsheng avatar Qinyuan Cheng avatar  avatar ChenxinAn avatar Yuxin Wang avatar  avatar zzzzzz avatar  avatar  avatar

Watchers

James Cloos avatar  avatar

knncontrastiveforood's Issues

Version not found

torchvision==0.8.2+cu110

This version of torchvision is not available and by using another version I'm not able to train on GPU, getting no CUDA available at the time of torch._C._cuda_init() , even if I have cuda 11.0 installed. Can you help me with this?

ValueError: Sample larger than population or is negative

Thanks for releasing your code. I use another dataset to run your code. I met this error:

trainer.py", line 289, in generate_positive_sample
positive_sample.extend(random.sample(self.negative_data[input_label], positive_num)
raise ValueError("Sample larger than population or is negative")

Can i modify positive_num to one? In your paper, default positive_num is three. Does this modification have a big impact on the results? Looking forward to your reply.

Is the result much worse because of a missing parameter file?

After running, I found that there was a big difference between the results I ran and those provided by the author. Is it because of the lack of these two corresponding hyperparameter files?

sim_embed: str = field(default="/remote-home/dmsong/train_data/adv_learn/counter-fitted-vectors.txt")
cosine_npy: str = field(default="/remote-home/dmsong/train_data/adv_learn/cos_sim_counter_fitting.npy")

question about dataset

Hi, yunhua.

I see that you write ''After datasets are split into train, validation, and test respectively, we randomly sample 25%, 50%, and 75% of the intent classes and discard the remaining classes in the training and validation sets.'' in your paper.
I can see that BANKING and stackoverflow dataset do not have OOD class in validation.

For CLINC-FULL and CLINC-SMALL dataset, do their validation set have OOD class?

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.