ibm / bagan Goto Github PK
View Code? Open in Web Editor NEWKeras implementation of Balancing GAN (BAGAN) applied to the MNIST example.
License: Eclipse Public License 1.0
Keras implementation of Balancing GAN (BAGAN) applied to the MNIST example.
License: Eclipse Public License 1.0
NO custom dataset ?
After the line, " print("BAGAN autoenc initialized, init gan") ", when the function self.init_gan() is called, an error occurs. The error occurs because it goes into the except block of the init_gan() function, the reason being, the function " self._get_lst_bck_name () " returns None.
Is this supposed to happen? As of now, I've just called the self.backup_point(0) to initialize the weights of the GAN. Is this alright ? This is just initialisation of the GAN right?
The network structure used in BAGAN paper is restnet18, but not here. How to modify the network structure to adapt to other larger data sets?
@kocolosk @dolph @krook @duglin @loafyloaf What the configuration used to output published results in this paper?
Does anyone know how to calculate the model accuracy for the MNIST dataset?
About Flowers dataset and GTSRB dataset.
HI,
Thank you for your excellent work. When run while cnn.output_shape[-1] > min_latent_res:
, it can not break the loop.
min_latent_res should change, right?
Thank you!
Jiaojiao
@stevemart @ova-mariani Great paper, thank you!
Can you provide results of "Quality of the Final Classification" not only as figures but also with just numbers? It will be cool to get results, for example, in CSV, for every cases GAN, ACGAN, BAGAN, Plain and Mirror.
I am running the same code I downloaded from the GitHub repository and I am using google colab notebook. During GAN training discriminator loss is reducing and generator loss is increasing. The images generated are not meaningful. Please help to solve this issue.
I wanted to use a custom multiclass dataset with many minority classes and want to perform augmentation for all minority classes. Please help.
I've tried to modify the BAGAN architecture for CIFAR-10, but unfortunately, the output of the BAGAN is random. I even used the same learning rate as mentioned in ACGAN. I've tried out different learning rates as well but to no avail.
I have made the requisite changes in all the related files to enable BAGAN to be trained on a multi-channel input. Could you guys mention the hyper-parameters that you used for CIFAR-10 so that I may be able to get to the bottom of this anomaly?
/usr/local/lib/python3.5/dist-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float
to np.floating
is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type
.
from ._conv import register_converters as _register_converters
Using TensorFlow backend.
WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/contrib/learn/python/learn/datasets/base.py:198: retry (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version.
Instructions for updating:
Use the retry module or similar alternatives.
Executing BAGAN.
read input data...
WARNING:tensorflow:From /data2/CZY/data/bagan/BAGAN/rw/batch_generator_mnist.py:23: read_data_sets (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.
Instructions for updating:
Please use alternatives such as official/mnist/dataset.py from tensorflow/models.
WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:260: maybe_download (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version.
Instructions for updating:
Please write your own downloading logic.
WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:262: extract_images (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.
Instructions for updating:
Please use tf.data to implement this functionality.
Extracting dataset/mnist/train-images-idx3-ubyte.gz
WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:267: extract_labels (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.
Instructions for updating:
Please use tf.data to implement this functionality.
Extracting dataset/mnist/train-labels-idx1-ubyte.gz
Extracting dataset/mnist/t10k-images-idx3-ubyte.gz
Extracting dataset/mnist/t10k-labels-idx1-ubyte.gz
WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:290: DataSet.init (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.
Instructions for updating:
Please use alternatives such as official/mnist/dataset.py from tensorflow/models.
Extracting dataset/mnist/train-images-idx3-ubyte.gz
Extracting dataset/mnist/train-labels-idx1-ubyte.gz
Extracting dataset/mnist/t10k-images-idx3-ubyte.gz
Extracting dataset/mnist/t10k-labels-idx1-ubyte.gz
input data loaded...
Extracting dataset/mnist/train-images-idx3-ubyte.gz
Extracting dataset/mnist/train-labels-idx1-ubyte.gz
Extracting dataset/mnist/t10k-images-idx3-ubyte.gz
Extracting dataset/mnist/t10k-labels-idx1-ubyte.gz
Required GAN for class 0
Class counters: [309, 6179, 5470, 5638, 5307, 4987, 5417, 5715, 5389, 5454]
WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/keras/backend/tensorflow_backend.py:1290: calling reduce_mean (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/keras/backend/tensorflow_backend.py:1205: calling reduce_prod (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
uratio set to: [0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1]
dratio set to: [0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1]
gratio set to: [0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1]
BAGAN init_autoenc
BAGAN: training autoencoder
2019-01-09 13:45:09.014380: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-01-09 13:45:11.457403: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1344] Found device 0 with properties:
name: GeForce GTX 1080 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.582
pciBusID: 0000:03:00.0
totalMemory: 10.91GiB freeMemory: 10.75GiB
2019-01-09 13:45:11.457487: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1423] Adding visible gpu devices: 0
2019-01-09 13:45:11.812727: I tensorflow/core/common_runtime/gpu/gpu_device.cc:911] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-01-09 13:45:11.812780: I tensorflow/core/common_runtime/gpu/gpu_device.cc:917] 0
2019-01-09 13:45:11.812793: I tensorflow/core/common_runtime/gpu/gpu_device.cc:930] 0: N
2019-01-09 13:45:11.814107: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1041] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10409 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:03:00.0, compute capability: 6.1)
Just waiting?
Hi,
Thank for your great work!
I would like to correct a little bit
In BatchGenerator you normalize the images by
img = img / 255 - 0.5
but in function save_image_array() , you recover it by
img = (img * 127.5 + 127.5).astype(np.uint8)
it leads to a little difference.
Seems like we want to normalize between -1 and 1
In BatchGenerator It should be: img = (img - 127.5) / 127.5
Thanks
Got the following error when running the script in run.sh.
RecursionError:: maximum recursion depth exceeded while getting the str of an object.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.