Coder Social home page Coder Social logo

gr-cgan's Introduction

Codebase for "Mind Your Step: Continuous Conditional GANs with Generator Regularization"

Authors: Yunkai Zhang*, Yufeng Zheng*, Xueying Ma, Siyuan Teng, Zeyu Zheng (*equal contribution).

This repo is based on the released code of "Time-series Generative Adversarial Networks (TimeGAN)".

This directory contains implementations of cTimeGAN framework for two real-world datasets.

To run the pipeline for training and evaluation on cTimeGAN framwork, simply run python3 main_timegan.py. See main_timegan.py for a list of arguments that you can pass.

Note that in order to run cTSGAN_gp, you must train the vae network first. For example, to run ETTm1, you must train vae on ETTm1_cond.

Note that any model architecture can be used as the generator and discriminator model such as RNNs or Transformers.

Command inputs:

  • data-name: ETTm1, ETTm1_all, stock, ETTm1_cond, ETTm1_all_cond, stock_cond
  • model-name: cTSGAN, cTSGAN_gp, vae, vae_gan

Note that network parameters should be optimized for different datasets.

Example command

First, place ETTm1.csv at './data/raw_data/ETTm1/ETTm1.csv'.

For the ease of reimplementation, we included saved model weights in this repo. You can simply run

$ python3 main_timegan.py --data-name ETTm1 --model cTSGAN_gp  --restore-iteration 49000

to just train for another 1000 steps before continuing to evaluation.

If you want to train from scratch, first train vae on ETTm1_cond

$ python3 main_timegan.py --data-name ETTm1_cond --model vae_gan

Move the best saved model weights from experiments/ETTm1_cond/vae_gan/base_model/ to experiments/ETTm1/vae_gan/base_model/. Rename the file as saved_[cond_length]klw[klw].pth.tar. If you use the default parameters, this will be saved_24_klw_00001.pth.tar.

$ python3 main_timegan.py --data-name ETTm1 --model cTSGAN_gp

Citation

@inproceedings{Zhang22Mind,
  author    = {Zhang, Yunkai and Zheng, Yufeng and Ma, Xueying and Teng, Siyuan and Zheng, Zeyu},
  title     = {Mind Your Step: Continuous Conditional GANs with Generator Regularization},
  year      = {2021},
  booktitle = {NeurIPS 2022 SyntheticData4ML Workshop},
}

gr-cgan's People

Contributors

zhykoties avatar

Watchers

 avatar Kostas Georgiou 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.