Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
DongHao committed May 27, 2017
1 parent c910e83 commit 2cfa53b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
12 changes: 2 additions & 10 deletions download.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,8 @@
- LSUN dataset
- MNIST dataset
"""

from __future__ import print_function
import os
import sys
import gzip
import json
import shutil
import zipfile
import argparse
import subprocess
import os, sys, gzip, json, shutil, zipfile, argparse, subprocess
from six.moves import urllib

parser = argparse.ArgumentParser(description='Download dataset for DCGAN.')
Expand Down Expand Up @@ -49,7 +41,7 @@ def download(url, dirpath):
f.close()
return filepath

def download_file_from_google_drive(id, destination):
def download_file_from_google_drive(id, destination):
URL = "https://docs.google.com/uc?export=download"
session = requests.Session()

Expand Down
7 changes: 1 addition & 6 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import os
import sys
import os, sys, pprint, time
import scipy.misc
import pprint
import numpy as np
import time
import tensorflow as tf
import tensorlayer as tl
from tensorlayer.layers import *
Expand All @@ -19,7 +16,6 @@
Usage : see README.md
"""

flags = tf.app.flags
flags.DEFINE_integer("epoch", 25, "Epoch to train [25]")
flags.DEFINE_float("learning_rate", 0.0002, "Learning rate of for adam [0.0002]")
Expand Down Expand Up @@ -172,6 +168,5 @@ def main(_):
tl.files.save_npz(net_d.all_params, name=net_d_iter_name, sess=sess)
print("[*] Saving checkpoints SUCCESS!")


if __name__ == '__main__':
tf.app.run()
3 changes: 0 additions & 3 deletions model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
import tensorlayer as tl
from tensorlayer.layers import *


flags = tf.app.flags
FLAGS = flags.FLAGS



def generator_simplified_api(inputs, is_train=True, reuse=False):
image_size = 64
s2, s4, s8, s16 = int(image_size/2), int(image_size/4), int(image_size/8), int(image_size/16)
Expand Down

0 comments on commit 2cfa53b

Please sign in to comment.