Code Monkey home page Code Monkey logo

adagan's Introduction

AdaGAN: Boosting Generative Models

This project implements the AdaGAN algorithm, presented in this paper.

Getting started

It is assumed that the user runs TensorFlow of version > 12.

Make sure the directory where you run code also contains sub-directories called mnist and models containing MNIST datasets and the pre-trained MNIST classifier respectively (provided in this repo).

Running

Gaussian Mixture Experiments

python adagan_gmm.py [options]

MNIST Experiments

python adagan_mnist.py [options]

3-digit MNIST Experiments

python adagan_mnist3.py [options]

Code is still under development and can be modified

adagan's People

Contributors

sylvaingelly avatar tolstikhin 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  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

adagan's Issues

Why replace=False?

In gan.py line 401,
data_ids = np.random.choice(train_size, opts['batch_size'],
replace=False, p=self._data_weights)
Why use replace=False here?

MNIST dataset load error

tensorflow version: 1.2.1
When I tried to run python adagan_mnist.py, it showed this error:
2017-07-07 19:46:49,618 - Loading MNIST
Traceback (most recent call last):
File "adagan_mnist.py", line 152, in
main()
File "adagan_mnist.py", line 113, in main
data = DataHandler(opts)
File "/home/xiaoyu/adagan/datahandler.py", line 62, in init
self._load_data(opts)
File "/home/xiaoyu/adagan/datahandler.py", line 69, in _load_data
self._load_mnist(opts)
File "/home/xiaoyu/adagan/datahandler.py", line 212, in _load_mnist
tr_X = loaded[16:].reshape((60000, 28, 28, 1)).astype(np.float)
ValueError: cannot reshape array of size 9912406 into shape (60000,28,28,1)
The dataset is downloaded from the MNIST website. So does anyone have any idea about what's wrong?

Error while loading mnist data ?

On running adagan_mnist.py, I am getting the following error:

tr_X = loaded[16:].reshape((60000, 28, 28, 1)).astype(np.float)
ValueError: cannot reshape array of size 9912406 into shape (60000,28,28,1)

On printing the size of "loaded", it shows (9912422,)
And loaded[16:] is (9912406,)

So I changed loaded[16:].reshape ... in line 411 to loaded.reshape ...

Still getting the same error with new array size:

tr_X = loaded.reshape((60000, 28, 28, 1)).astype(np.float)
ValueError: cannot reshape array of size 9912422 into shape (60000,28,28,1)

What's the meaning of POT?

Thank you very much for your fantastic code. But I wanna know what's the meaning of POT in your code?

Thanks for your answer!

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.