diff options
author | Vasil Zlatanov <v@skozl.com> | 2019-03-05 14:32:38 +0000 |
---|---|---|
committer | Vasil Zlatanov <v@skozl.com> | 2019-03-05 14:32:38 +0000 |
commit | 6b573a30a3021d259400af9751645eb1a5b4705b (patch) | |
tree | 09d68aa13d19062369f5044bf246ddd89a579fdb /dcgan.py | |
parent | 740e1b0c6a02a7bec20008758373f0dd80baade4 (diff) | |
parent | 2a720c237259baa2d968286244f9e43794c7e4d9 (diff) | |
download | e4-gan-6b573a30a3021d259400af9751645eb1a5b4705b.tar.gz e4-gan-6b573a30a3021d259400af9751645eb1a5b4705b.tar.bz2 e4-gan-6b573a30a3021d259400af9751645eb1a5b4705b.zip |
Full featured VBN
Diffstat (limited to 'dcgan.py')
-rw-r--r-- | dcgan.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -124,7 +124,7 @@ class DCGAN(): return Model(img, validity) - def train(self, epochs, batch_size=128, save_interval=50): + def train(self, epochs, batch_size=128, save_interval=50, VBN=False): # Load the dataset (X_train, _), (_, _) = mnist.load_data() @@ -139,6 +139,7 @@ class DCGAN(): xaxis = np.arange(epochs) loss = np.zeros((2,epochs)) + for epoch in tqdm(range(epochs)): # --------------------- @@ -150,7 +151,6 @@ class DCGAN(): imgs = X_train[idx] tf.keras.backend.get_session().run(tf.global_variables_initializer()) - # Sample noise and generate a batch of new images noise = np.random.normal(0, 1, (batch_size, self.latent_dim)) gen_imgs = self.generator.predict(noise) |