GithubHelp home page GithubHelp logo

alinlab / masker Goto Github PK

View Code? Open in Web Editor NEW
51.0 4.0 11.0 12.11 MB

MASKER: Masked Keyword Regularization for Reliable Text Classification (AAAI 2021)

Home Page: https://arxiv.org/abs/2012.09392

Python 100.00%
text-classification out-of-distribution-detection domain-generalization

masker's People

Contributors

sangwoomo avatar seungjun-moon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

masker's Issues

1-vs-rest

Hello. Thank you for your good thesis and code.

I have a question while comparing paper and code.

I think this code is carried out in a multi-class classification method, is that right? If I misunderstood, I wonder what part of "1-vs-rest" is implemented.

The DOC module

Thanks for your excellent idea and implementation first.
I mentioned that 1 vs rest structure was used for OoD Detection in the paper, but currently it's not included in this repo. Could you please public the part for the community to reprouduce the results? Thank you very much!

optimal hyperparameters issue

I run the code on multiple datasets that used in the paper. But I could not achieve the precision described in the paper. Can you publish the optimal hyperparameters of each experiment?

Other language usage

Hi , I really like and appreciate what you guys are doing.
Is it possible to implement the method on other languages ? etc :Chinese
General-usage of language model was being used in the method , I was curious about the difference between domain-specific finetuned language model and models with MASKER mentioned in the paper and how they affect OOD and performance on downstream tasks. Have you given a try ,yet?
Really looking forward to your response. Thanks.

Code issue

I run the following code:

python train.py --dataset foods --split_ratio 0.25 --seed 0
--train_type base
--backbone bert --classifier_type softmax --optimizer adam_vanilla \

Encountered the following problem:

Loading pre-trained backbone network...
Initializing dataset and model...
Initializing base dataset... (name: foods)
Training model...
Traceback (most recent call last):
File "train.py", line 109, in
main()
File "train.py", line 75, in main
train_base(args, train_loader, model, optimizer, epoch)
File "/home/bigdata11/pzw/MASKER/training/base.py", line 27, in train_base
out_cls = model(tokens) # (B, C)
File "/home/bigdata11/anaconda3/envs/pzw/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/bigdata11/pzw/MASKER/models.py", line 48, in forward
out_p = self.dropout(out_p)
File "/home/bigdata11/anaconda3/envs/pzw/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/bigdata11/anaconda3/envs/pzw/lib/python3.6/site-packages/torch/nn/modules/dropout.py", line 58, in forward
return F.dropout(input, self.p, self.training, self.inplace)
File "/home/bigdata11/anaconda3/envs/pzw/lib/python3.6/site-packages/torch/nn/functional.py", line 983, in dropout
else _VF.dropout(input, p, training))
TypeError: dropout(): argument 'input' (position 1) must be Tensor, not str

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.