# Path: awesome_gans/datasets.py
# class MNISTDataSet:
#     def __init__(self, use_split=False, split_rate=0.15, random_state=42, ds_path=None):
#         self.use_split = use_split
#         self.split_rate = split_rate
#         self.random_state = random_state
# 
#         self.ds_path = ds_path
# 
#         try:
#             assert self.ds_path
#         except AssertionError:
#             raise AssertionError("[-] MNIST DataSet Path is required!")
# 
#         from tensorflow.examples.tutorials.mnist import input_data
# 
#         self.data = input_data.read_data_sets(self.ds_path, one_hot=True)  # download MNIST
# 
#         # training data
#         self.train_data = self.data.train
# 
#         self.train_images = self.train_data.images
#         self.train_labels = self.train_data.labels
#         self.valid_images = None
#         self.valid_labels = None
# 
#         # test data
#         self.test_data = self.data.test
# 
#         self.test_images = self.test_data.images
#         self.test_labels = self.test_data.labels
# 
#         # split training data set into train, valid
#         if self.use_split:
#             self.train_images, self.valid_images, self.train_labels, self.valid_labels = train_test_split(
#                 self.train_images, self.train_labels, test_size=self.split_rate, random_state=self.random_state
#             )


import time
import numpy as np
import tensorflow as tf
import awesome_gans.fgan.fgan_model as fgan
import awesome_gans.image_utils as iu
from awesome_gans.datasets import MNISTDataSet as DataSet

results = {
    'output': './gen_img/',
    'model': './model/',
}

train_step = {
    'batch_size': 4096,
    'global_steps': 20001,
    'logging_interval': 1000,
}


def main():
    start_time = time.time()  # Clocking start

    # Loading MNIST DataSet
    mnist = DataSet(ds_path="D:\\DataSet/mnist/").data

    config = tf.ConfigProto()
    config.gpu_options.allow_growth = True

    idx = 1
    divergences = [
        'GAN',
        'KL',
        'Reverse-KL',
        'JS',
        'JS-Weighted',
        'Squared-Hellinger',

# Path: awesome_gans/datasets.py
# class MNISTDataSet:
#     def __init__(self, use_split=False, split_rate=0.15, random_state=42, ds_path=None):
#         self.use_split = use_split
#         self.split_rate = split_rate
#         self.random_state = random_state
# 
#         self.ds_path = ds_path
# 
#         try:
#             assert self.ds_path
#         except AssertionError:
#             raise AssertionError("[-] MNIST DataSet Path is required!")
# 
#         from tensorflow.examples.tutorials.mnist import input_data
# 
#         self.data = input_data.read_data_sets(self.ds_path, one_hot=True)  # download MNIST
# 
#         # training data
#         self.train_data = self.data.train
# 
#         self.train_images = self.train_data.images
#         self.train_labels = self.train_data.labels
#         self.valid_images = None
#         self.valid_labels = None
# 
#         # test data
#         self.test_data = self.data.test
# 
#         self.test_images = self.test_data.images
#         self.test_labels = self.test_data.labels
# 
#         # split training data set into train, valid
#         if self.use_split:
#             self.train_images, self.valid_images, self.train_labels, self.valid_labels = train_test_split(
#                 self.train_images, self.train_labels, test_size=self.split_rate, random_state=self.random_state
#             )


# Path: awesome_gans/fgan/fgan_train.py
import time
import numpy as np
import tensorflow as tf
import awesome_gans.fgan.fgan_model as fgan
import awesome_gans.image_utils as iu
from awesome_gans.datasets import MNISTDataSet as DataSet


results = {
    'output': './gen_img/',
    'model': './model/',
}

train_step = {
    'batch_size': 4096,
    'global_steps': 20001,
    'logging_interval': 1000,
}


def main():
    start_time = time.time()  # Clocking start

    # Loading MNIST DataSet
    mnist = DataSet(ds_path="D:\\DataSet/mnist/").data

    config = tf.ConfigProto()
    config.gpu_options.allow_growth = True

    idx = 1
    divergences = [
        'GAN',
        'KL',
        'Reverse-KL',
        'JS',
        'JS-Weighted',
        'Squared-Hellinger',

        'Pearson',