GithubHelp home page GithubHelp logo

annotation-embedding's Introduction

LeMA (Leveraging Misleading Answer)


This is the PyTorch code of the works Focusing valid search space in Open-World Compositional Zero-Shot Learning by leveraging misleading answers. The code provides the implementation of our proposed training method, LeMA, with other baselines (e.g. SymNet, AoP, TMN, LabelEmbed+,RedWine).

Setup

  1. Clone the repo

  2. We recommend using Anaconda for environment setup. To create the environment and activate it, please run:

conda env create --file anno_environment.yml
conda activate czsl
  1. Go to the cloned repo and open a terminal. Download the datasets and embeddings, specifying the desired path (e.g. DATA_ROOT in the example):
bash ./utils/download_data.sh DATA_ROOT
mkdir logs

The word2vec s3 url has stopped working. You can download the data from Kaggle or use this Google Drive link (be careful downloading files from Google Drive).

cd DATA_ROOT/w2v
mv download_location/GoogleNews-vectors-negative300.bin.gz .
gzip -d GoogleNews-vectors-negative300.bin.gz
rm GoogleNews-vectors-negative300.bin.gz

Train

  • If you want to apply LeMA during training, enter the "--lema" argument. We provide the LeMA training option for three models (e.g., Co-CGE, CompCos, KG-SP).
  • The '--fast_eval' argument helps make the evaluation process more efficient.

train CGQA

python train.py --config configs/model_cfg_path/cgqa.yml (--lema)

train MIT

python train.py --config configs/model_cfg_path/mit.yml (--lema)

train UT-Zappos50k

python train.py --config configs/model_cfg_path/utzappos.yml (--lema)

annotation-embedding's People

Contributors

sangjun-leee avatar tobesuperior avatar

Watchers

 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.