Giter Site home page Giter Site logo

ggf's Introduction

Gradual Domain Adaptation via Gradient Flow

This repository is the official implementation of Gradual Domain Adaptation via Gradient Flow (GGF).

Requirements

To install requirements:

pip install -r requirements.txt

Data Preparation

Download the Portraits dataset from here.

Run dataset/make_mnist.ipynb and dataset/make_portraits.ipynb to build the UMAP features of source and target domains.

Training

First, to train the modules (score network, rectified flow, and initial classifier) in the paper, run this command:

python train_init.py --task portraits --class_num 2 --save_path save/ --gpu_id 0
python train_init.py --task mnist45 --class_num 10 --save_path save/ --gpu_id 0
python train_init.py --task mnist60 --class_num 10 --save_path save/ --gpu_id 0

Second, to gradual generate intermediate domains and update the classifier, run this command:

python train_ggf.py --task portraits --class_num 2 
python train_ggf.py --task mnist45 --class_num 10 --alpha --iterations --lambda --eta1 --eta2 --eta3 --confidence
python train_ggf.py --task mnist60 --class_num 10 --alpha --iterations --lambda --eta1 --eta2 --eta3 --confidence

Reference

The "Denoise score matching" algorithm is built upon the implementation from https://github.com/Ending2015a/toy_gradlogp.

The codes related to "Rectified Flow" are built upon the tutorial code of the official implementation from https://github.com/gnobitab/RectifiedFlow.

Citation

@inproceedings{
    zhuang2024gradual,
    title={Gradual Domain Adaptation via Gradient Flow},
    author={Zhan Zhuang and Yu Zhang and Ying Wei},
    booktitle={The Twelfth International Conference on Learning Representations},
    year={2024},
    url={https://openreview.net/forum?id=iTTZFKrlGV}
}

ggf's People

Contributors

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